code: private static boolean checkAlreadyCompactedBasedOnSourceDirName (FileSystem fs, Dataset dataset) {
      try {
        Set<Path> renamedDirs = getDeepestLevelRenamedDirsWithFileExistence(fs, dataset.inputPaths());
        return !renamedDirs.isEmpty();
      } catch (IOException e) {
        LOG.error("Failed to get deepest directories from source", e);
        return false;
      }
    }
docs: When renaming source directory strategy is used, a compaction completion means source directories
  {@link Dataset#inputPaths()} contains at least one directory which has been renamed to something with
  {@link MRCompactor#COMPACTION_RENAME_SOURCE_DIR_SUFFIX}.