public SingleByteBuff allocateOneBuffer() {
    if (isReservoirEnabled()) {
      ByteBuffer bb = getBuffer();
      if (bb != null) {
        return new SingleByteBuff(() -> putbackBuffer(bb), bb);
      }
    }
    // Allocated from heap, let the JVM free its memory.
    return (SingleByteBuff) ByteBuff.wrap(allocateOnHeap(bufSize));
  }
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