public static final long setLocation(long state, int arenaIx, int headerIx) {
      long arenaVal = ((long)arenaIx) << ARENA_SHIFT, arenaWMask = arenaVal & ARENA_MASK;
      long headerVal = ((long)headerIx) << HEADER_SHIFT, headerWMask = headerVal & HEADER_MASK;
      assert arenaVal == arenaWMask : "Arena " + arenaIx + " is wider than " + ARENA_WIDTH;
      assert headerVal == headerWMask : "Header " + headerIx + " is wider than " + HEADER_WIDTH;
      return (state & ~(ARENA_MASK | HEADER_MASK)) | arenaWMask | headerWMask;
    }
@return null if no action is required; otherwise, the buffer should be deallocated and,
        if the value is true, its memory should be released to the memory manager.
llap-server/src/java/org/apache/hadoop/hive/llap/cache/LlapAllocatorBuffer.java