public Configuration getConfiguration(Collection<String> services) {
    Map<String, Map<String, Map<String, String>>> attributes = new HashMap<>();
    Map<String, Map<String, String>> properties = new HashMap<>();

    for (String service : services) {
      Collection<String> serviceConfigTypes = getConfigurationTypes(service);
      for (String type : serviceConfigTypes) {
        Map<String, String> typeProps = properties.get(type);
        if (typeProps == null) {
          typeProps = new HashMap<>();
          properties.put(type, typeProps);
        }
        typeProps.putAll(getConfigurationProperties(service, type));

        Map<String, Map<String, String>> stackTypeAttributes = getConfigurationAttributes(service, type);
        if (!stackTypeAttributes.isEmpty()) {
          if (! attributes.containsKey(type)) {
            attributes.put(type, new HashMap<>());
          }
          Map<String, Map<String, String>> typeAttributes = attributes.get(type);
          for (Map.Entry<String, Map<String, String>> attribute : stackTypeAttributes.entrySet()) {
            String attributeName = attribute.getKey();
            Map<String, String> attributeProps = typeAttributes.get(attributeName);
            if (attributeProps == null) {
              attributeProps = new HashMap<>();
              typeAttributes.put(attributeName, attributeProps);
            }
            attributeProps.putAll(attribute.getValue());
          }
        }
      }
    }
    return new Configuration(properties, attributes);
  }
Obtain auto-deploy information for the specified component.
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Stack.java