private void checkSeekBefore(ExtendedCell[] cells, HFileScanner scanner, int i)
    throws IOException {
    assertEquals(
      "Failed to seek to the key before #" + i + " (" + CellUtil.getCellKeyAsString(cells[i]) + ")",
      true, scanner.seekBefore(cells[i]));
  }
Scanner.seekBefore() could fail because when seeking to a previous HFile data block, it needs
to know the size of that data block, which it calculates using current data block offset and
the previous data block offset. This fails to work when there are leaf-level index blocks in
the scannable section of the HFile, i.e. starting in HFileV2. This test will try seekBefore()
on a flat (single-level) and multi-level (2,3) HFile and confirm this bug is now fixed. This
bug also happens for inline Bloom blocks for the same reasons.
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestSeekBeforeWithInlineBlocks.java