Esempio n. 1
0
 /** Ensures orcReader is initialized for the split. */
 private void ensureOrcReader() throws IOException {
   if (orcReader != null) return;
   Path path = HdfsUtils.getFileIdPath(fs, split.getPath(), fileId);
   if (DebugUtils.isTraceOrcEnabled()) {
     LOG.info("Creating reader for " + path + " (" + split.getPath() + ")");
   }
   long startTime = counters.startTimeCounter();
   ReaderOptions opts = OrcFile.readerOptions(conf).filesystem(fs).fileMetadata(fileMetadata);
   orcReader = EncodedOrcFile.createReader(path, opts);
   counters.incrTimeCounter(Counter.HDFS_TIME_US, startTime);
 }