public boolean updateBuffer(JobConf job, RecordReader recordreader,
      WritableComparable key, Writable value) throws IOException {
    key = ReflectionUtils.copy(job, buffer.get(cur).getKey(), key);
    value = ReflectionUtils.copy(job, buffer.get(cur).getValue(), value);
    boolean notEOF = recordreader.next(buffer.get(cur).getKey(), buffer.get(cur).getValue());
    if (notEOF) {
      cur = (++cur) % buffer.size();
    }
    return notEOF;
  }
Enqueue most recent record read, and dequeue earliest result in the queue.

@param job
         Current job configuration.

@param recordreader
         Record reader.

@param key
         Key of current reading record.

@param value
         Value of current reading record.

@return Return false if reaches the end of file, otherwise return true.
ql/src/java/org/apache/hadoop/hive/ql/exec/FooterBuffer.java