public static void checkFormatVersion(int version) throws IllegalArgumentException {
    if (version < MIN_FORMAT_VERSION || version > MAX_FORMAT_VERSION) {
      throw new IllegalArgumentException("Invalid HFile version: " + version + " (expected to be "
        + "between " + MIN_FORMAT_VERSION + " and " + MAX_FORMAT_VERSION + ")");
    }
  }
Checks the given {@link HFile} format version, and throws an exception if invalid. Note that if
the version number comes from an input file and has not been verified, the caller needs to
re-throw an {@link IOException} to indicate that this is not a software error, but corrupted
input.
@param version an HFile version
@throws IllegalArgumentException if the version is invalid
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java