public void createHostComponents(AddServiceInfo request) {
    LOG.info("Creating host component resources for {}", request);

    Set<Map<String, Object>> properties = request.newServices().entrySet().stream()
      .flatMap(componentsOfService -> componentsOfService.getValue().entrySet().stream()
        .flatMap(hostsOfComponent -> hostsOfComponent.getValue().stream()
          .map(host -> createHostComponentRequestProperties(request, componentsOfService.getKey(), hostsOfComponent.getKey(), host))))
      .collect(toSet());

    createResources(request, Resource.Type.HostComponent, properties, null, false);
  }
Creates resources using the resource providers.
Translates {@link AddServiceInfo} to internal requests accepted by those.
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/ResourceProviderAdapter.java