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 2016/09/13 01:31:49 UTC
[02/50] [abbrv] drill git commit: MD-290: Fix build failure due to
upstream changes.
MD-290: Fix build failure due to upstream changes.
+ Includes MD-292
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/c5c24792
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/c5c24792
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/c5c24792
Branch: refs/heads/master
Commit: c5c24792b83f71826aea61ec9870146de48cfe98
Parents: a19d016
Author: Aditya Kishore <ad...@apache.org>
Authored: Fri Aug 26 11:37:00 2016 -0700
Committer: Aditya Kishore <ad...@apache.org>
Committed: Fri Sep 9 10:08:27 2016 -0700
----------------------------------------------------------------------
.../exec/store/maprdb/MapRDBFormatPlugin.java | 177 ++++++++++---------
1 file changed, 93 insertions(+), 84 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/c5c24792/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/maprdb/MapRDBFormatPlugin.java
----------------------------------------------------------------------
diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/maprdb/MapRDBFormatPlugin.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/maprdb/MapRDBFormatPlugin.java
index 305d581..eb72db0 100644
--- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/maprdb/MapRDBFormatPlugin.java
+++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/maprdb/MapRDBFormatPlugin.java
@@ -17,8 +17,9 @@
*/
package org.apache.drill.exec.store.maprdb;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.google.common.collect.ImmutableSet;
+import java.io.IOException;
+import java.util.List;
+import java.util.Set;
import org.apache.drill.common.exceptions.ExecutionSetupException;
import org.apache.drill.common.expression.SchemaPath;
@@ -33,101 +34,109 @@ import org.apache.drill.exec.store.dfs.FileSelection;
import org.apache.drill.exec.store.dfs.FileSystemPlugin;
import org.apache.drill.exec.store.dfs.FormatMatcher;
import org.apache.drill.exec.store.dfs.FormatPlugin;
-import org.apache.drill.exec.store.dfs.DrillFileSystem;
import org.apache.drill.exec.store.hbase.HBaseScanSpec;
-
import org.apache.hadoop.conf.Configuration;
-import java.io.IOException;
-import java.util.List;
-import java.util.Set;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.google.common.collect.ImmutableSet;
-public class MapRDBFormatPlugin implements FormatPlugin{
- static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MapRDBFormatPlugin.class);
-
- private final StoragePluginConfig storageConfig;
- private final MapRDBFormatPluginConfig config;
- private final MapRDBFormatMatcher matcher;
- private final Configuration fsConf;
- private final DrillbitContext context;
- private final String name;
-
- public MapRDBFormatPlugin(String name, DrillbitContext context, Configuration fsConf, StoragePluginConfig storageConfig){
- this(name, context, fsConf, storageConfig, new MapRDBFormatPluginConfig());
- }
+public class MapRDBFormatPlugin implements FormatPlugin {
+ static final org.slf4j.Logger logger = org.slf4j.LoggerFactory
+ .getLogger(MapRDBFormatPlugin.class);
- public MapRDBFormatPlugin(String name, DrillbitContext context, Configuration fsConf, StoragePluginConfig storageConfig, MapRDBFormatPluginConfig formatConfig){
- this.context = context;
- this.config = formatConfig;
- this.matcher = new MapRDBFormatMatcher(this);
- this.storageConfig = storageConfig;
- this.fsConf = fsConf;
- this.name = name == null ? "maprdb" : name;
- }
- @Override
- public boolean supportsRead() {
- return true;
- }
-
- @Override
- public boolean supportsWrite() {
- return false;
- }
-
- @Override
- public FormatMatcher getMatcher() {
+ private final StoragePluginConfig storageConfig;
+ private final MapRDBFormatPluginConfig config;
+ private final MapRDBFormatMatcher matcher;
+ private final Configuration fsConf;
+ private final DrillbitContext context;
+ private final String name;
+
+ public MapRDBFormatPlugin(String name, DrillbitContext context, Configuration fsConf,
+ StoragePluginConfig storageConfig) {
+ this(name, context, fsConf, storageConfig, new MapRDBFormatPluginConfig());
+ }
+
+ public MapRDBFormatPlugin(String name, DrillbitContext context, Configuration fsConf,
+ StoragePluginConfig storageConfig, MapRDBFormatPluginConfig formatConfig) {
+ this.context = context;
+ this.config = formatConfig;
+ this.matcher = new MapRDBFormatMatcher(this);
+ this.storageConfig = storageConfig;
+ this.fsConf = fsConf;
+ this.name = name == null ? "maprdb" : name;
+ }
+
+ @Override
+ public boolean supportsRead() {
+ return true;
+ }
+
+ @Override
+ public boolean supportsWrite() {
+ return false;
+ }
+
+ @Override
+ public boolean supportsAutoPartitioning() {
+ return false;
+ }
+
+ @Override
+ public FormatMatcher getMatcher() {
return matcher;
- }
+ }
public Configuration getFsConf() {
return fsConf;
}
- @Override
- public AbstractWriter getWriter(PhysicalOperator child, String location)
- throws IOException {
- throw new UnsupportedOperationException();
- }
+ @Override
+ public AbstractWriter getWriter(PhysicalOperator child, String location,
+ List<String> partitionColumns) throws IOException {
+ throw new UnsupportedOperationException();
+ }
- @Override
+ @Override
@JsonIgnore
- public Set<StoragePluginOptimizerRule> getOptimizerRules() {
- return ImmutableSet.of(MapRDBPushFilterIntoScan.INSTANCE);
- }
-
- @Override
- public AbstractGroupScan getGroupScan(String userName, FileSelection selection,
- List<SchemaPath> columns) throws IOException {
- List<String> files = selection.getAsFiles();
- assert(files.size() == 1);
- String tableName = files.get(0);
- HBaseScanSpec scanSpec = new HBaseScanSpec(tableName);
- try {
- return new MapRDBGroupScan(userName, (FileSystemPlugin)(context.getStorage().getPlugin(storageConfig)), this, scanSpec, columns);
- } catch (ExecutionSetupException e) {
- e.printStackTrace();
- return null;
- }
+ public Set<StoragePluginOptimizerRule> getOptimizerRules() {
+ return ImmutableSet.of(MapRDBPushFilterIntoScan.INSTANCE);
+ }
+
+ @Override
+ public AbstractGroupScan getGroupScan(String userName, FileSelection selection,
+ List<SchemaPath> columns) throws IOException {
+ List<String> files = selection.getAsFiles();
+ assert (files.size() == 1);
+ String tableName = files.get(0);
+ HBaseScanSpec scanSpec = new HBaseScanSpec(tableName);
+ try {
+ return new MapRDBGroupScan(userName,
+ (FileSystemPlugin) (context.getStorage().getPlugin(storageConfig)), this, scanSpec,
+ columns);
+ } catch (ExecutionSetupException e) {
+ e.printStackTrace();
+ return null;
}
+ }
+
+ @Override
+ public FormatPluginConfig getConfig() {
+ return config;
+ }
+
+ @Override
+ public StoragePluginConfig getStorageConfig() {
+ return storageConfig;
+ }
+
+ @Override
+ public DrillbitContext getContext() {
+ return context;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
- @Override
- public FormatPluginConfig getConfig() {
- return config;
- }
-
- @Override
- public StoragePluginConfig getStorageConfig() {
- return storageConfig;
- }
-
- @Override
- public DrillbitContext getContext() {
- return context;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
}