public static boolean isValidSnapshot()

in kyuubi-relocated-zookeeper-parent/kyuubi-relocated-zookeeper-36/src/main/java/org/apache/zookeeper/server/persistence/SnapStream.java [172:190]


  public static boolean isValidSnapshot(File file) throws IOException {
    if (file == null || Util.getZxidFromName(file.getName(), FileSnap.SNAPSHOT_FILE_PREFIX) == -1) {
      return false;
    }

    boolean isValid = false;
    switch (getStreamMode(file.getName())) {
      case GZIP:
        isValid = isValidGZipStream(file);
        break;
      case SNAPPY:
        throw new UnsupportedOperationException(
            "[KYUUBI-SHADED #28] " + ZOOKEEPER_SHAPSHOT_STREAM_MODE + " does not support snappy");
      case CHECKED:
      default:
        isValid = isValidCheckedStream(file);
    }
    return isValid;
  }