private void expectNumLevels(int expectedNumLevels) {
      if (numLevels != expectedNumLevels) {
        throw new IllegalStateException("Number of block index levels is " + numLevels
          + "but is expected to be " + expectedNumLevels);
      }
    }
Returns the number of levels in this block index.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.java