public HFileBlock seekToDataBlock(final ExtendedCell key, HFileBlock currentBlock,
      boolean cacheBlocks, boolean pread, boolean isCompaction,
      DataBlockEncoding expectedDataBlockEncoding, CachingBlockReader cachingBlockReader)
      throws IOException {
      BlockWithScanInfo blockWithScanInfo = loadDataBlockWithScanInfo(key, currentBlock,
        cacheBlocks, pread, isCompaction, expectedDataBlockEncoding, cachingBlockReader);
      if (blockWithScanInfo == null) {
        return null;
      } else {
        return blockWithScanInfo.getHFileBlock();
      }
    }
Return the data block which contains this key. This function will only be called when the
HFile version is larger than 1.
@param key                       the key we are looking for
@param currentBlock              the current block, to avoid re-reading the same block
@param expectedDataBlockEncoding the data block encoding the caller is expecting the data
                                 block to be in, or null to not perform this check and return
                                 the block irrespective of the encoding
@return reader a basic way to load blocks
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.java