From ff8a310e2acb467d84d089eccd1314b81cb90d08 Mon Sep 17 00:00:00 2001 From: Edmon Begoli Date: Sun, 30 Aug 2015 10:56:22 -0400 Subject: [PATCH 1/6] DRILL-3724 Improve javadoc of the plugin component Improve the javadoc of the key methods and classes for custom plugin development. --- .../apache/drill/exec/store/StoragePlugin.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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 eef63a267e3..c020d219aba 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,10 +28,19 @@ import org.apache.drill.exec.physical.base.AbstractGroupScan; 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 getOptimizerRules(OptimizerRulesContext optimizerContext); /** @@ -52,10 +61,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 columns) throws IOException; - + + /** Method returns a jackson serializable object that extends a StoragePluginConfig + * @return an extension of StoragePluginConfig + */ public StoragePluginConfig getConfig(); } From 6c47dc0a2372847fe755f30ad6199ae6acbe0523 Mon Sep 17 00:00:00 2001 From: Edmon Begoli Date: Sun, 30 Aug 2015 11:00:18 -0400 Subject: [PATCH 2/6] DRILL-3724 Improve javadoc of the plugin component Improve the javadoc of the key methods and classes for custom plugin development. --- .../apache/drill/exec/store/dfs/easy/EasyFormatPlugin.java | 4 ++++ 1 file changed, 4 insertions(+) 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 3c2b80670af..7bd4cb00cfd 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,10 @@ public boolean isBlockSplittable() { return blockSplittable; } + /** Whether or not this format could also be in a compression container (for example: csv.gz versus csv). + * This is an external compression container that would be handled outside of the format code. + * This is an internal compression scheme, not supported by Parquet. + */ public boolean isCompressible() { return compressible; } From d755eb391c1a9c4c7d39bcca93069c14b35ec7a7 Mon Sep 17 00:00:00 2001 From: Edmon Begoli Date: Sun, 30 Aug 2015 11:03:43 -0400 Subject: [PATCH 3/6] DRILL-3724 Improve javadoc of the plugin component --- .../org/apache/drill/exec/store/AbstractStoragePlugin.java | 4 ++++ 1 file changed, 4 insertions(+) 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 822a210e21c..f02bd91d7eb 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 @@ -28,6 +28,10 @@ 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); From b52d33c9750253e83ec8b03b01b2e71698de0609 Mon Sep 17 00:00:00 2001 From: Edmon Begoli Date: Sun, 30 Aug 2015 11:08:35 -0400 Subject: [PATCH 4/6] DRILL-3724 Improve javadoc of the plugin component --- .../main/java/org/apache/drill/exec/store/StoragePlugin.java | 4 ++++ 1 file changed, 4 insertions(+) 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 c020d219aba..7e912df6fb6 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 @@ -27,6 +27,10 @@ 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. From 51f1206a953a347118e44a4db54f92287eb407b0 Mon Sep 17 00:00:00 2001 From: Edmon Begoli Date: Sun, 30 Aug 2015 11:56:18 -0400 Subject: [PATCH 5/6] DRILL-3724 Improve javadoc of storage components. --- .../apache/drill/exec/store/dfs/easy/EasyFormatPlugin.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 7bd4cb00cfd..28be522c182 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,9 +115,8 @@ public boolean isBlockSplittable() { return blockSplittable; } - /** Whether or not this format could also be in a compression container (for example: csv.gz versus csv). - * This is an external compression container that would be handled outside of the format code. - * This is an internal compression scheme, not supported by Parquet. + /** 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; From be66cc8957801c4137369e0474655966395fcb85 Mon Sep 17 00:00:00 2001 From: Edmon Begoli Date: Wed, 9 Sep 2015 08:37:02 -0400 Subject: [PATCH 6/6] DRILL-3724 0 fixed checkstyle issues. --- .../drill/exec/store/AbstractStoragePlugin.java | 3 +-- .../apache/drill/exec/store/StoragePlugin.java | 16 ++++++++-------- .../exec/store/dfs/easy/EasyFormatPlugin.java | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) 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 f02bd91d7eb..5ba4b17c192 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 @@ -28,9 +28,8 @@ import com.google.common.collect.ImmutableSet; -/** Abstract class for StorePlugin implementations. +/** 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); 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 7e912df6fb6..5f82246e795 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 @@ -27,22 +27,22 @@ 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 +/** 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. + /** 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 getOptimizerRules(OptimizerRulesContext optimizerContext); @@ -68,10 +68,10 @@ public interface StoragePlugin extends SchemaFactory { */ public AbstractGroupScan getPhysicalScan(String userName, JSONOptions selection, List columns) throws IOException; - + /** Method returns a jackson serializable object that extends a StoragePluginConfig - * @return an extension of StoragePluginConfig - */ + * @return an extension of StoragePluginConfig + */ public StoragePluginConfig getConfig(); } 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 28be522c182..a59b7f1cf88 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,7 +115,7 @@ public boolean isBlockSplittable() { return blockSplittable; } - /** Method indicates whether or not this format could also be in a compression container (for example: csv.gz versus csv). + /** 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() {