public void add(HiveKey key, BytesWritable value) {
    writeHiveKey(output, key);
    writeValue(output, value);
    rowsOnDisk++;
  }
An eager key/value container that puts every row directly to output stream.
Kryo is used for the serialization/deserialization.
When reading, we load IN_MEMORY_NUM_ROWS rows from input stream to memory batch by batch.
ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/KeyValueContainer.java