private ByteBuffer allocateOnHeap(int size) {
    heapAllocationBytes.add(size);
    return ByteBuffer.allocate(size);
  }
Allocate an buffer with buffer size from ByteBuffAllocator, Note to call the
{@link ByteBuff#release()} if no need any more, otherwise the memory leak happen in NIO
ByteBuffer pool.
@return an ByteBuff with the buffer size.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBuffAllocator.java