public static void checkHFileVersion(final Configuration c) {
    int version = c.getInt(FORMAT_VERSION_KEY, MAX_FORMAT_VERSION);
    if (version < MAX_FORMAT_VERSION || version > MAX_FORMAT_VERSION) {
      throw new IllegalArgumentException(
        "The setting for " + FORMAT_VERSION_KEY + " (in your hbase-*.xml files) is " + version
          + " which does not match " + MAX_FORMAT_VERSION
          + "; are you running with a configuration from an older or newer hbase install (an "
          + "incompatible hbase-default.xml or hbase-site.xml on your CLASSPATH)?");
    }
  }
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