public void expandAndRehashToTarget(int estimateNewRowCount) {
    int oldRefsCount = refs.length;
    int newRefsCount = oldRefsCount + estimateNewRowCount;
    if (resizeThreshold <= newRefsCount) {
      newRefsCount =
          (Long.bitCount(newRefsCount) == 1) ? newRefsCount : nextHighestPowerOfTwo(newRefsCount);
      expandAndRehashImpl(newRefsCount);
      LOG.info("Expand and rehash to " + newRefsCount + " from " + oldRefsCount);
    }
  }
Number of bytes used by the hashmap.
There are two main components that take most memory: writeBuffers and refs
Others include instance fields: 100
@return number of bytes
ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/BytesBytesMultiHashMap.java