private static long roundUp(long n, long to) {
    return ((n + to - 1) / to) * to;
  }
We allocate a number of byte buffers as the capacity.
@param capacity  total size of the byte buffer array
@param allocator the ByteBufferAllocator that will create the buffers
@throws IOException throws IOException if there is an exception thrown by the allocator
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferArray.java