@Override
    protected void add(final byte[] key, final long offset, final int dataSize) {
      blockOffsets[rootCount] = offset;
      // Create the blockKeys as Cells once when the reader is opened
      blockKeys[rootCount] = new KeyValue.KeyOnlyKeyValue(key, 0, key.length);
      blockDataSizes[rootCount] = dataSize;
      rootCount++;
    }
Adds a new entry in the root block index. Only used when reading.
@param key      Last key in the block
@param offset   file offset where the block is stored
@param dataSize the uncompressed data size
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.java