@Override
  public boolean doNext(K key, V value) throws IOException {
    if (ExecMapper.getDone()) {
      return false;
    }
    return super.doNext(key, value);
  }
HiveRecordReader is a simple wrapper on RecordReader. It allows us to stop
reading the data when some global flag ExecMapper.getDone() is set.
ql/src/java/org/apache/hadoop/hive/ql/io/HiveRecordReader.java