public boolean addDependentTask(Task<?> dependent) {
    boolean ret = false;
    if (getChildTasks() == null) {
      setChildTasks(new ArrayList<Task<?>>());
    }
    if (!getChildTasks().contains(dependent)) {
      ret = true;
      getChildTasks().add(dependent);
      if (dependent.getParentTasks() == null) {
        dependent.setParentTasks(new ArrayList<Task<?>>());
      }
      if (!dependent.getParentTasks().contains(this)) {
        dependent.getParentTasks().add(this);
      }
    }
    return ret;
  }
Add a dependent task on the current task. Return if the dependency already existed or is this a
new one

@return true if the task got added false if it already existed
ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java