@Override
    protected long calculateHeapSizeForBlockKeys(long heapSize) {
      // Calculating the size of blockKeys
      if (blockKeys != null) {
        heapSize += ClassSize.REFERENCE;
        // Adding array + references overhead
        heapSize += ClassSize.align(ClassSize.ARRAY + blockKeys.length * ClassSize.REFERENCE);

        // Adding bytes
        for (byte[] key : blockKeys) {
          heapSize += ClassSize.align(ClassSize.ARRAY + key.length);
        }
      }
      return heapSize;
    }
An implementation of the BlockIndexReader that deals with block keys which are plain byte[]
like MetaBlock or the Bloom Block for ROW bloom. Does not need a comparator. It can work on
Bytes.BYTES_RAWCOMPARATOR
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.java