private void collectFileSinkUris(List<Node> topNodes, Set<URI> uris, Set<TableDesc> tableDescs) {

    CollectFileSinkUrisNodeProcessor np = new CollectFileSinkUrisNodeProcessor(uris, tableDescs);

    Map<SemanticRule, SemanticNodeProcessor> opRules = new LinkedHashMap<SemanticRule, SemanticNodeProcessor>();
    addCollectFileSinkUrisRules(opRules, np);

    SemanticDispatcher disp = new DefaultRuleDispatcher(np, opRules, null);
    SemanticGraphWalker ogw = new DefaultGraphWalker(disp);

    try {
      ogw.startWalking(topNodes, null);
    } catch (SemanticException e) {
      throw new RuntimeException(e);
    }
  }
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