@Override
  public boolean next(K key, V value) throws IOException {
    if(!initDone) {
      throw new IOException("Hive IOContext is not inited.");
    }
    updateIOContext();
    try {
      boolean retVal = doNext(key, value);
      if(retVal) {
        if(key instanceof RecordIdentifier) {
          //supports AcidInputFormat which uses the KEY pass ROW__ID info
          ioCxtRef.setRecordIdentifier((RecordIdentifier)key);
        }
        else if(recordReader instanceof AcidInputFormat.AcidRecordReader) {
          //supports AcidInputFormat which do not use the KEY pass ROW__ID info
          AcidInputFormat.AcidRecordReader acidRecordReader = (AcidInputFormat.AcidRecordReader) this.recordReader;
          OrcRawRecordMerger.ReaderKey recordIdentifier = acidRecordReader.getRecordIdentifier();
          if (recordIdentifier == null) {
            ioCxtRef.parseRecordIdentifier(jobConf);
          } else {
            ioCxtRef.setRecordIdentifier(recordIdentifier);
          }
          ioCxtRef.setDeletedRecord(recordIdentifier != null && recordIdentifier.isDeleteEvent());
        } else {
          ioCxtRef.parseRecordIdentifier(jobConf);
          ioCxtRef.parsePositionDeleteInfo(jobConf);
        }
      }
      return retVal;
    } catch (IOException e) {
      ioCxtRef.setIOExceptions(true);
      throw e;
    }
  }
Close this {@link InputSplit} to future operations.

@throws IOException
ql/src/java/org/apache/hadoop/hive/ql/io/HiveContextAwareRecordReader.java