public Map<String, Map<String, String>> getConfigurationAttributes(String service, String type) {
    Map<String, Map<String, String>> attributesMap = new HashMap<>();
    Map<String, ConfigProperty> configProperties = serviceConfigurations.get(service).get(type);
    if (configProperties != null) {
      for (Map.Entry<String, ConfigProperty> configProperty : configProperties.entrySet()) {
        String propertyName = configProperty.getKey();
        Map<String, String> propertyAttributes = configProperty.getValue().getAttributes();
        if (propertyAttributes != null) {
          for (Map.Entry<String, String> propertyAttribute : propertyAttributes.entrySet()) {
            String attributeName = propertyAttribute.getKey();
            String attributeValue = propertyAttribute.getValue();
            if (attributeValue != null) {
              Map<String, String> attributes = attributesMap.get(attributeName);
              if (attributes == null) {
                  attributes = new HashMap<>();
                  attributesMap.put(attributeName, attributes);
              }
              attributes.put(propertyName, attributeValue);
            }
          }
        }
      }
    }
    return attributesMap;
  }
Get config attributes for the specified service and configuration type.

@param service  service name
@param type     configuration type

@return  map of attribute names to map of property names to attribute values
         for the specified service and configuration type
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Stack.java