public OrcFileStripeMergeRecordReader(Configuration conf, FileSplit split) { path = split.getPath(); start = split.getStart(); end = start + split.getLength(); FileSystem fs = path.getFileSystem(conf); this.reader = OrcFile.createReader(path, OrcFile.readerOptions(conf).filesystem(fs)); this.iter = reader.getStripes().GetEnumerator(); this.stripeIdx = 0; this.stripeStatistics = ((ReaderImpl)reader).getOrcProtoStripeStatistics(); }
VectorizedOrcRecordReader(Reader file, Configuration conf, FileSplit fileSplit) { List <OrcProto.Type> types = file.getTypes(); Reader.Options options = new Reader.Options(); this.offset = fileSplit.getStart(); this.length = fileSplit.getLength(); options.range(offset, length); options.include(OrcInputFormat.genIncludedColumns(types, conf, true)); OrcInputFormat.setSearchArgument(options, types, conf, true); this.reader = file.rowsOptions(options); try { rbCtx = new VectorizedRowBatchCtx(); rbCtx.init(conf, fileSplit); } catch (Exception e) { throw; } }