private void initializeProcessingComponentMappings() {
    m_process = new LinkedHashMap<>();

    if (CollectionUtils.isEmpty(processing)) {
      return;
    }

    for (ProcessingService svc : processing) {
      Map<String, ProcessingComponent> componentMap = m_process.get(svc.name);

      // initialize mapping if not present for the given service name
      if (null == componentMap) {
        componentMap = new LinkedHashMap<>();
        m_process.put(svc.name, componentMap);
      }

      for (ProcessingComponent pc : svc.components) {
        if (pc != null) {
          componentMap.put(pc.name, pc);
        } else {
          LOG.warn("ProcessingService {} has null amongst it's values (total {} components)",
              svc.name, svc.components.size());
        }
      }
    }
  }
Builds a mapping of component name to {@link ProcessingComponent} and then
maps those to service name, initializing {@link #m_process} to the result.
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/UpgradePack.java