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();
        }
예제 #2
0
        getRecordReader(InputSplit inputSplit, JobConf conf,
                        Reporter reporter)
        {
            FileSplit fSplit = (FileSplit)inputSplit;

            reporter.setStatus(fSplit.ToString());

            Path path = fSplit.getPath();

            OrcFile.ReaderOptions opts = OrcFile.readerOptions(conf);
            if (fSplit is OrcSplit)
            {
                OrcSplit orcSplit = (OrcSplit)fSplit;
                if (orcSplit.hasFooter())
                {
                    opts.fileMetaInfo(orcSplit.getFileMetaInfo());
                }
            }
            Reader reader = OrcFile.createReader(path, opts);

            return(new VectorizedOrcRecordReader(reader, conf, fSplit));
        }