private void registerDir(Path path, WatchedPathInfo watchedPathInfo) {
    watchedPaths.put(path, watchedPathInfo);
    try {
      WatchKey watchKey = path.register(watchService, ENTRY_CREATE);
      watchedPathInfo.setWatchKey(watchKey);
      watchedPathQueue.add(watchedPathInfo);
      if (watchedPathInfo.type == Type.FINAL) {
        trackWatchForAttempt(watchedPathInfo, watchKey);
      }
    } catch (IOException e) {
      LOG.warn("Unable to setup watch for: " + 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