public static void disallowSnapshot(DistributedFileSystem dfs, Path snapshotPath) {
    try {
      // Check if the directory is snapshottable.
      if (dfs.getFileStatus(snapshotPath).isSnapshotEnabled()) {
        dfs.disallowSnapshot(snapshotPath);
      }
    } catch (Exception e) {
      LOG.warn("Could not disallow snapshot for path {}", snapshotPath, e);
    }
  }
Attempts to disallow snapshot on a path, ignoring exceptions.
@param dfs DistributedFileSystem
@param snapshotPath path of snapshot
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/util/SnapshotUtils.java