private static Map<String, String> createComponentHostMap(Cluster cluster) {
    return StageUtils.createComponentHostMap(
      cluster.getServices().keySet(),
      service -> getComponentsForService(cluster, service),
      (service, component) -> getHostsForServiceComponent(cluster, service, component)
    );
  }
Creates the service, component and host component resources for the request.
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/AddServiceOrchestrator.java