public SortedMap<String, SortedMap<String, SortedMap<String, String>>> sortConfigurationAttributes(
      Map<String, Map<String, Map<String, String>>> configurationAttributes) {
    SortedMap<String, SortedMap<String, SortedMap<String, String>>> configurationAttributesTreeMap = new TreeMap<>();
    configurationAttributes.forEach((k, v) -> {
      SortedMap<String, SortedMap<String, String>> c = new TreeMap<>();
      v.forEach((k1, v1) -> c.put(k1, new TreeMap<>(v1)));
      configurationAttributesTreeMap.put(k, c);
    });

    return configurationAttributesTreeMap;
  }
Collects actual configurations and configuration attributes for specified host.
@param hostId host id to collect configurations and configuration attributes
@return event ready to send to agent
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java