protected boolean initNextRecordReader ( ) throws IOException { if ( curReader != null ) { curReader . close ( ) ; curReader = null ; if ( idx > 0 ) { progress += split . getLength ( idx - 1 ) ; // done processing so far } } // if all chunks have been processed, nothing more to do. if ( idx == split . getNumPaths ( ) ) { return false ; } // get a record reader for the idx-th chunk try { curReader = rrConstructor . newInstance ( new Object [ ] { split , jc , reporter , Integer . valueOf ( idx ) } ) ; // setup some helper config variables. jc . set ( "map.input.file" , split . getPath ( idx ) . toString ( ) ) ; jc . setLong ( "map.input.start" , split . getOffset ( idx ) ) ; jc . setLong ( "map.input.length" , split . getLength ( idx ) ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } idx ++ ; return true ; }
Get the record reader for the next chunk in this CombineFileSplit .