@Override
    public Void call() {
      while (!shutdown.get()) {
        // Relying on watchService.close to clean up all pending watches
        WatchedPathInfo pathInfo;
        try {
          pathInfo = watchedPathQueue.take();
        } catch (InterruptedException e) {
          if (shutdown.get()) {
            LOG.info("Shutting down WatchExpirer");
            break;
          } else {
            LOG.error("WatchExpirer interrupted before being shutdown");
            throw new RuntimeException("WatchExpirer interrupted before being shutdown", e);
          }
        }
        WatchKey watchKey = pathInfo.getWatchKey();
        if (watchKey != null && watchKey.isValid()) {
          watchKey.cancel();
        }
      }
      return null;
    }
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