public void getKey(long keyRefWord, ByteSegmentRef keyByteSegmentRef,
      WriteBuffers.Position readPos) {

    int storedKeyLength =
        (int) ((keyRefWord & SmallKeyLength.bitMask) >> SmallKeyLength.bitShift);
    boolean isKeyLengthSmall = (storedKeyLength != SmallKeyLength.allBitsOn);

    long absoluteKeyOffset =
        (keyRefWord & AbsoluteKeyOffset.bitMask);

    writeBuffers.setReadPoint(absoluteKeyOffset, readPos);
    if (!isKeyLengthSmall) {

      // Read big key length we wrote with the key.
      storedKeyLength = writeBuffers.readVInt(readPos);
    }
    writeBuffers.getByteSegmentRefToCurrent(keyByteSegmentRef, storedKeyLength, readPos);
  }
THIS METHOD IS NOT THREAD-SAFE. Use only at load time (or be mindful of thread safety).
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastKeyStore.java