@Override
    public Object dispatch(Node nd, Stack<Node> stack, Object... nodeOutputs)
        throws SemanticException {
      Task<?> currTask = (Task<?>) nd;
      // not map reduce task or not conditional task, just skip
      if (currTask.isMapRedTask()) {
        if (currTask instanceof ConditionalTask) {
          // get the list of task
          List<Task<?>> taskList = ((ConditionalTask) currTask).getListTasks();
          for (Task<?> tsk : taskList) {
            if (tsk.isMapRedTask()) {
              this.processCurrentTask(tsk, ((ConditionalTask) currTask));
            }
          }
        } else {
          this.processCurrentTask(currTask, null);
        }
      }
      return null;
    }
Iterator each tasks. If this task has a local work,create a new task for this local work, named
MapredLocalTask. then make this new generated task depends on current task's parent task, and
make current task depends on this new generated task
ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MapJoinResolver.java