@ Override public void initialize ( InputSplit inputSplit , TaskAttemptContext taskAttemptContext ) throws IOException { FileSplit fileSplit = ( FileSplit ) inputSplit ; Configuration conf = taskAttemptContext . getConfiguration ( ) ; Reader reader = OrcFile . createReader ( fileSplit . getPath ( ) , OrcFile . readerOptions ( conf ) . maxLength ( OrcConf . MAX_FILE_LENGTH . getLong ( conf ) ) . filesystem ( fileSplit . getPath ( ) . getFileSystem ( conf ) ) ) ; Reader . Options options = OrcInputFormat . buildOptions ( conf , reader , fileSplit . getStart ( ) , fileSplit . getLength ( ) ) ; recordReader = reader . rows ( options ) ; }
Initialize ORC file reader and batch record reader . Please note that initBatch is needed to be called after this .