aboutsummaryrefslogtreecommitdiff
path: root/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyFormatPlugin.java
diff options
context:
space:
mode:
authorJacques Nadeau <jacques@apache.org>2015-05-06 02:56:45 -0700
committerJacques Nadeau <jacques@apache.org>2015-05-07 00:06:33 -0700
commit7ec99871b97c70793e2e5eb2e795040c5b6ade66 (patch)
treeefeee4effdd4ecc9fd0fea24364af932590f4d81 /exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyFormatPlugin.java
parent151a7f4506e7ea16be335549b89090e857103b4e (diff)
DRILL-2006: Updated Text reader. Increases variations of text files Drill can work with.
Text reader is heavily inspired by uniVocity parser although it is now byte based and customized for Drill's memory representations. Also updated the RecordReader interface so that OperatorContext is presented at setup time rather than being a separate call.
Diffstat (limited to 'exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyFormatPlugin.java')
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyFormatPlugin.java9
1 files changed, 4 insertions, 5 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 b4efe70a4..762760a6c 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
@@ -49,7 +49,6 @@ import org.apache.drill.exec.store.dfs.FileSelection;
import org.apache.drill.exec.store.dfs.FormatMatcher;
import org.apache.drill.exec.store.dfs.FormatPlugin;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.io.compress.CompressionCodecFactory;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
@@ -66,7 +65,6 @@ public abstract class EasyFormatPlugin<T extends FormatPluginConfig> implements
private final StoragePluginConfig storageConfig;
protected final FormatPluginConfig formatConfig;
private final String name;
- protected final CompressionCodecFactory codecFactory;
private final boolean compressible;
protected EasyFormatPlugin(String name, DrillbitContext context, Configuration fsConf,
@@ -82,7 +80,6 @@ public abstract class EasyFormatPlugin<T extends FormatPluginConfig> implements
this.storageConfig = storageConfig;
this.formatConfig = formatConfig;
this.name = name == null ? defaultName : name;
- this.codecFactory = new CompressionCodecFactory(new Configuration(fsConf));
}
@Override
@@ -148,8 +145,10 @@ public abstract class EasyFormatPlugin<T extends FormatPluginConfig> implements
newColumns.add(AbstractRecordReader.STAR_COLUMN);
}
// Create a new sub scan object with the new set of columns;
- scan = new EasySubScan(scan.getUserName(), scan.getWorkUnits(), scan.getFormatPlugin(), newColumns,
- scan.getSelectionRoot());
+ EasySubScan newScan = new EasySubScan(scan.getUserName(), scan.getWorkUnits(), scan.getFormatPlugin(),
+ newColumns, scan.getSelectionRoot());
+ newScan.setOperatorId(scan.getOperatorId());
+ scan = newScan;
}
int numParts = 0;