@Override
    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx,
        Object... nodeOutputs) throws SemanticException {
      for (Node n : stack) {
        Operator<? extends OperatorDesc> op = (Operator<? extends OperatorDesc>) n;
        OperatorDesc desc = op.getConf();
        if (desc instanceof FileSinkDesc) {
          FileSinkDesc fileSinkDesc = (FileSinkDesc) desc;
          tableDescs.add(fileSinkDesc.getTableInfo());

          Path dirName = fileSinkDesc.getDirName();
          if (dirName != null) {
            uris.add(dirName.toUri());
          }
          Path destPath = fileSinkDesc.getDestPath();
          if (destPath != null) {
            uris.add(destPath.toUri());
          }
        }
      }
      return null;
    }
Notifiers to synchronize resource localization across threads. If one thread is localizing
a file, other threads can wait on the corresponding notifier object instead of just sleeping
before re-checking HDFS. This is used just to avoid unnecesary waits; HDFS check still needs
to be performed to make sure the resource is there and matches the expected file.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java