@Override
  public long heapSize() {
    if (this.buf.hasArray()) {
      return ClassSize.align(FIXED_OVERHEAD + length);
    }
    return (long) ClassSize.align(FIXED_OVERHEAD) + this.getSerializedSize();
  }
This Cell is an implementation of {@link ByteBufferExtendedCell} where the data resides in off
heap/ on heap ByteBuffer
hbase-common/src/main/java/org/apache/hadoop/hbase/ByteBufferKeyValue.java