private void serialize(int pos, long value) throws IOException {
    serializeWrite.setAppend(output);

    switch (primitiveCategory) {
    case BOOLEAN:
      serializeWrite.writeBoolean(value != 0);
      break;
    case BYTE:
      serializeWrite.writeByte((byte) value);
      break;
    case SHORT:
      serializeWrite.writeShort((short) value);
      break;
    case INT:
      serializeWrite.writeInt((int) value);
      break;
    case DATE:
      serializeWrite.writeDate((int) value);
      break;
    case LONG:
      serializeWrite.writeLong(value);
      break;
    default:
      throw new RuntimeException("Unexpected primitive category " + primitiveCategory.name());
    }
    int outputNewPosition = output.getLength();
    serializedKeyLengths[pos] = outputNewPosition - currentKeyStart;
    currentKeyStart = outputNewPosition;
  }
A key series of a single column of long keys where the keys get serialized.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/keyseries/VectorKeySeriesLongSerialized.java