private void checkFileVersion(Path path) {
    int majorVersion = trailer.getMajorVersion();
    if (majorVersion == getMajorVersion()) {
      return;
    }
    int minorVersion = trailer.getMinorVersion();
    if (majorVersion == 2 && minorVersion >= MIN_V2_MINOR_VERSION_WITH_PB) {
      return;
    }
    // We can read v3 or v2 versions of hfile.
    throw new IllegalArgumentException("Invalid HFile version: major=" + trailer.getMajorVersion()
      + ", minor=" + trailer.getMinorVersion() + ": expected at least " + "major=2 and minor="
      + MAX_MINOR_VERSION + ", path=" + path);
  }
File version check is a little sloppy. We read v3 files but can also read v2 files if their
content has been pb'd; files written with 0.98.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileInfo.java