@Override
  public void initialize(InputSplit genericSplit, TaskAttemptContext context)
      throws IOException {
    if (logger.atFine().isEnabled()) {
      try {
        logger.atFine().log(
            "initialize('%s', '%s')",
            HadoopToStringUtil.toString(genericSplit), HadoopToStringUtil.toString(context));
      } catch (InterruptedException ie) {
        logger.atFine().withCause(ie).log(
            "InterruptedException during HadoopToStringUtil.toString");
      }
    }
    Preconditions.checkArgument(genericSplit instanceof FileSplit,
        "InputSplit genericSplit should be an instance of FileSplit.");
    // Get FileSplit.
    FileSplit fileSplit = (FileSplit) genericSplit;
    // Create the JsonParser.
    jsonParser = new JsonParser();
    // Initialize the LineRecordReader.
    lineReader = new LineRecordReader();
    lineReader.initialize(fileSplit, context);
  }
@ Override public void initialize ( InputSplit genericSplit , TaskAttemptContext context ) throws IOException { if ( logger . atFine ( ) . isEnabled ( ) ) { try { logger . atFine ( ) . log ( "initialize('%s', '%s')" , HadoopToStringUtil . toString ( genericSplit ) , HadoopToStringUtil . toString ( context ) ) ; } catch ( InterruptedException ie ) { logger . atFine ( ) . withCause ( ie ) . log ( "InterruptedException during HadoopToStringUtil.toString" ) ; } } Preconditions . checkArgument ( genericSplit instanceof FileSplit , "InputSplit genericSplit should be an instance of FileSplit." ) ; FileSplit fileSplit = ( FileSplit ) genericSplit ; jsonParser = new JsonParser ( ) ; lineReader = new LineRecordReader ( ) ; lineReader . initialize ( fileSplit , context ) ; }
Called once at initialization to initialize the RecordReader.

@param genericSplit the split that defines the range of records to read.
@param context the information about the task.
@throws IOException on IO Error.