private HiveKey readHiveKey(Input input) {
    HiveKey hiveKey = new HiveKey(input.readBytes(input.readInt()), input.readInt());
    hiveKey.setDistKeyLength(input.readInt());
    return hiveKey;
  }
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