private void writeValue(Output output, BytesWritable bytesWritable) {
    int size = bytesWritable.getLength();
    output.writeInt(size);
    output.writeBytes(bytesWritable.getBytes(), 0, size);
  }
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