private void scanForFinalFiles(WatchedPathInfo watchedPathInfo, Path path) {
    try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(path) ) {
      for (Path p : dirStream) {
        if (p.getFileName().toString().equals(ShuffleHandler.DATA_FILE_NAME)) {
          registerFoundAttempt(watchedPathInfo.pathIdentifier, null, path);
        } else if (p.getFileName().toString().equals(ShuffleHandler.INDEX_FILE_NAME)) {
          registerFoundAttempt(watchedPathInfo.pathIdentifier, path, null);
        } else {
          LOG.warn("Ignoring unknown file: " + p.getFileName());
        }
      }
    } catch (IOException e) {
      LOG.warn("Unable to open dir stream for attemptDir: " + path);
    }
  }
Invoke when a pathIdentifier has been found, or is no longer of interest
@param pathIdentifier
llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/DirWatcher.java