You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ad...@apache.org on 2015/09/15 14:12:34 UTC
[5/5] drill git commit: DRILL-3724: Improve javadoc of the plugin
component
DRILL-3724: Improve javadoc of the plugin component
Improve the javadoc of the key methods and classes for custom plugin development.
this closes #139
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/0c1b293d
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/0c1b293d
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/0c1b293d
Branch: refs/heads/master
Commit: 0c1b293d92ca8db88d4c3c43a7029e53a6890430
Parents: d6adf5c
Author: Edmon Begoli <eb...@gmail.com>
Authored: Sun Aug 30 10:56:22 2015 -0400
Committer: adeneche <ad...@gmail.com>
Committed: Mon Sep 14 08:00:13 2015 -0700
----------------------------------------------------------------------
.../drill/exec/store/AbstractStoragePlugin.java | 3 +++
.../apache/drill/exec/store/StoragePlugin.java | 18 +++++++++++++++++-
.../exec/store/dfs/easy/EasyFormatPlugin.java | 3 +++
3 files changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/0c1b293d/exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractStoragePlugin.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractStoragePlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractStoragePlugin.java
index 33870aa..5e49bb0 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractStoragePlugin.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractStoragePlugin.java
@@ -29,6 +29,9 @@ import org.apache.drill.exec.physical.base.AbstractGroupScan;
import com.google.common.collect.ImmutableSet;
+/** Abstract class for StorePlugin implementations.
+ * See StoragePlugin for description of the interface intent and its methods.
+ */
public abstract class AbstractStoragePlugin implements StoragePlugin{
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(AbstractStoragePlugin.class);
http://git-wip-us.apache.org/repos/asf/drill/blob/0c1b293d/exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePlugin.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePlugin.java
index 375116d..3bb5ef5 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePlugin.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePlugin.java
@@ -28,11 +28,24 @@ import org.apache.drill.common.logical.StoragePluginConfig;
import org.apache.drill.exec.ops.OptimizerRulesContext;
import org.apache.drill.exec.physical.base.AbstractGroupScan;
+/** Interface for all implementations of the storage plugins. Different implementations of the storage
+ * formats will implement methods that indicate if Drill can write or read its tables from that format,
+ * if there are optimizer rules specific for the format, getting a storage config. etc.
+ */
public interface StoragePlugin extends SchemaFactory {
+
+ /** Indicates if Drill can read the table from this format.
+ */
public boolean supportsRead();
+ /** Indicates if Drill can write a table to this format (e.g. as JSON, csv, etc.).
+ */
public boolean supportsWrite();
+ /** An implementation of this method will return one or more specialized rules that Drill query
+ * optimizer can leverage. Otherwise, it should return an empty set.
+ * @return an empty set or a set of plugin specific optimizer rules.
+ */
public Set<? extends RelOptRule> getOptimizerRules(OptimizerRulesContext optimizerContext);
/**
@@ -53,10 +66,13 @@ public interface StoragePlugin extends SchemaFactory {
* @param columns (optional) The list of column names to scan from the data source.
* @return
* @throws IOException
- */
+ */
public AbstractGroupScan getPhysicalScan(String userName, JSONOptions selection, List<SchemaPath> columns)
throws IOException;
+ /** Method returns a jackson serializable object that extends a StoragePluginConfig
+ * @return an extension of StoragePluginConfig
+ */
public StoragePluginConfig getConfig();
}
http://git-wip-us.apache.org/repos/asf/drill/blob/0c1b293d/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyFormatPlugin.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyFormatPlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyFormatPlugin.java
index 3c2b806..a59b7f1 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyFormatPlugin.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyFormatPlugin.java
@@ -115,6 +115,9 @@ public abstract class EasyFormatPlugin<T extends FormatPluginConfig> implements
return blockSplittable;
}
+ /** Method indicates whether or not this format could also be in a compression container (for example: csv.gz versus csv).
+ * If this format uses its own internal compression scheme, such as Parquet does, then this should return false.
+ */
public boolean isCompressible() {
return compressible;
}