private void initializeAddComponentTasks() {
    for (Grouping group : groups) {
      if (ClusterGrouping.class.isInstance(group)) {
        List<ExecuteStage> executeStages = ((ClusterGrouping) group).executionStages;
        for (ExecuteStage executeStage : executeStages) {
          Task task = executeStage.task;

          // keep track of this for later ...
          if (task.getType() == Type.ADD_COMPONENT) {
            AddComponentTask addComponentTask = (AddComponentTask) task;
            m_addComponentTasks.put(addComponentTask.getServiceAndComponentAsString(),
                addComponentTask);
          }
        }
      }
    }
  }
Builds a mapping of SERVICE/COMPONENT to {@link AddComponentTask}.
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/UpgradePack.java