public byte getValueResult(byte[] key, int offset, int length, Result hashMapResult,
      MatchTracker matchTracker) {

    hashMapResult.forget();

    WriteBuffers.Position readPos = hashMapResult.getReadPos();

    // First, find first record for the key.
    long ref = findKeyRefToRead(key, offset, length, readPos, matchTracker);
    if (ref == 0) {
      return 0;
    }

    boolean hasList = Ref.hasList(ref);

    // This relies on findKeyRefToRead doing key equality check and leaving read ptr where needed.
    long offsetAfterListRecordKeyLen = hasList ? writeBuffers.getReadPoint(readPos) : 0;

    hashMapResult.set(this, Ref.getOffset(ref), hasList, offsetAfterListRecordKeyLen);

    return Ref.getStateByte(ref);
  }
Finds a key.  Values can be read with the supplied result object.

Important Note: The caller is expected to pre-allocate the hashMapResult and not
share it among other threads.

@param key Key buffer.
@param offset the offset to the key in the buffer
@param hashMapResult The object to fill in that can read the values.
@param matchTracker Opitional object for tracking key matches.
@return The state byte.
ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/BytesBytesMultiHashMap.java