private static HdfsDirSnapshot addToSnapshot(Map<Path, HdfsDirSnapshot> dirToSnapshots, Path fPath) {
    HdfsDirSnapshot dirSnapshot = dirToSnapshots.get(fPath);
    if (dirSnapshot == null) {
      dirSnapshot = new HdfsDirSnapshotImpl(fPath);
      dirToSnapshots.put(fPath, dirSnapshot);
    }
    return dirSnapshot;
  }
In case of the cleaner, we don't need to go into file level, it is enough to collect base/delta/deletedelta directories.

@param fs the filesystem used for the directory lookup
@param path the path of the table or partition needs to be cleaned
@return The listed directory snapshot needs to be checked for cleaning
@throws IOException on filesystem errors
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java