public static boolean deleteSnapshotSafe(DistributedFileSystem dfs, Path snapshotPath, String snapshotName)
      throws IOException {
    try {
      dfs.deleteSnapshot(snapshotPath, snapshotName);
      return true;
    } catch (SnapshotException e) {
      LOG.debug("Couldn't delete the snapshot {} under path {}", snapshotName, snapshotPath, e);
    } catch (FileNotFoundException fnf) {
      LOG.warn("Couldn't delete the snapshot {} under path {}", snapshotName, snapshotPath, fnf);
    }
    return false;
  }
Attempts deleting a snapshot, if exists.
@param dfs DistributedFileSystem
@param snapshotPath path of snapshot
@param snapshotName name of the snapshot
@return true if the snapshot gets deleted.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/util/SnapshotUtils.java