This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 90c9060 Always use local filesystem for ORCRecordReader (#5299)
90c9060 is described below
commit 90c90602a96f750dd52e3e14d5d61a1f16ad46ba
Author: Xiaotian (Jackie) Jiang <[email protected]>
AuthorDate: Fri Apr 24 19:58:46 2020 -0700
Always use local filesystem for ORCRecordReader (#5299)
RecordReader takes a local file as input. Always use local filesystem to
read it in ORCRecordReader
---
.../org/apache/pinot/plugin/inputformat/orc/ORCRecordReader.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/pinot-plugins/pinot-input-format/pinot-orc/src/main/java/org/apache/pinot/plugin/inputformat/orc/ORCRecordReader.java
b/pinot-plugins/pinot-input-format/pinot-orc/src/main/java/org/apache/pinot/plugin/inputformat/orc/ORCRecordReader.java
index 9cb0062..824a33b 100644
---
a/pinot-plugins/pinot-input-format/pinot-orc/src/main/java/org/apache/pinot/plugin/inputformat/orc/ORCRecordReader.java
+++
b/pinot-plugins/pinot-input-format/pinot-orc/src/main/java/org/apache/pinot/plugin/inputformat/orc/ORCRecordReader.java
@@ -28,6 +28,7 @@ import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector;
import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
@@ -78,8 +79,9 @@ public class ORCRecordReader implements RecordReader {
throws IOException {
_schema = schema;
- Reader orcReader =
- OrcFile.createReader(new Path(dataFile.getAbsolutePath()),
OrcFile.readerOptions(new Configuration()));
+ Configuration configuration = new Configuration();
+ Reader orcReader = OrcFile.createReader(new
Path(dataFile.getAbsolutePath()),
+
OrcFile.readerOptions(configuration).filesystem(FileSystem.getLocal(configuration)));
TypeDescription orcSchema = orcReader.getSchema();
Preconditions
.checkState(orcSchema.getCategory() ==
TypeDescription.Category.STRUCT, "ORC schema must be of type: STRUCT");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]