private static ArrayList<String> getDiffList(ArrayList<String> newList, ArrayList<String> oldList, HiveConf conf,
      boolean isLoad) throws SemanticException {
    ArrayList<String> diffList = new ArrayList<>();
    for (String oldPath : oldList) {
      if (!newList.contains(oldPath)) {
        if (isLoad) {
          diffList.add(externalTableDataPath(conf, getExternalTableBaseDir(conf), new Path(oldPath)).toString());
        } else {
          diffList.add(oldPath);
        }
        diffList.add(oldPath);
      }
    }
    return diffList;
  }
Deletes the snapshots present in the list.
@param diffList Elements to be deleted.
@param prefix Prefix used in snapshot names,
@param snapshotCount snapshot counter to track the number of snapshots deleted.
@param conf the Hive Configuration.
@throws IOException in case of any error.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/util/SnapshotUtils.java