public List<BaseWork> getParents(BaseWork work) {
    assert invertedWorkGraph.containsKey(work)
      && invertedWorkGraph.get(work) != null;
    return new LinkedList<BaseWork>(invertedWorkGraph.get(work));
  }
getParents returns all the nodes with edges leading into work
ql/src/java/org/apache/hadoop/hive/ql/plan/TezWork.java