@Override
  protected ByteBuf newHeapBuffer(int initialCapacity, int maxCapacity) {
    LOG.info("newHeapBuffer initialCapacity={}, maxCapacity={}", initialCapacity, maxCapacity);
    return Unpooled.buffer(initialCapacity, maxCapacity);
  }
A custom byte buf allocator for TestNettyRpcServer.
hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/SimpleByteBufAllocator.java