private void collectNeededFileSinkData(BaseWork work, Set<URI> fileSinkUris, Set<TableDesc> fileSinkTableDescs) {
    List<Node> topNodes = getTopNodes(work);
    LOG.debug("Collecting file sink uris for {} topnodes: {}", work.getClass(), topNodes);
    collectFileSinkUris(topNodes, fileSinkUris, fileSinkTableDescs);
  }
Set up credentials for the base work on secure clusters
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java