public static void mergeConfigAttributes(Map<String, Map<String, String>> attributes, Map<String, Map<String, String>> additionalAttributes){
    for(Map.Entry<String, Map<String, String>> attrEntry: additionalAttributes.entrySet()){
      String attributeName = attrEntry.getKey();
      Map<String, String> attributeProperties = attrEntry.getValue();
      if(!attributes.containsKey(attributeName)) {
        attributes.put(attributeName, attributeProperties);
      } else {
        attributes.get(attributeName).putAll(attributeProperties);
      }
    }
  }
Merge one attribute map to another.
@param attributes original map
@param additionalAttributes map with additional attributes
ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java