private void addRecommendedPropertiesForConfigType(Map<String, Map<String, String>> kerberosConfigurations,
                                                     String configType, Map<String, String> recommendedConfigProperties,
                                                     Map<String, String> existingConfigProperties,
                                                     Map<String, String> kerberosConfigProperties,
                                                     Set<String> ignoreProperties) {

    for (Map.Entry<String, String> property : recommendedConfigProperties.entrySet()) {
      String propertyName = property.getKey();

      if ((ignoreProperties == null) || !ignoreProperties.contains(propertyName)) {
        String recommendedValue = property.getValue();

        if ((kerberosConfigProperties == null) || !kerberosConfigProperties.containsKey(propertyName)) {
          // There is no explicit update for this property from the Kerberos Descriptor...
          // add the config and property if it also does not exist in the existing configurations
          if ((existingConfigProperties == null) || !existingConfigProperties.containsKey(propertyName)) {
            LOG.debug("Adding Kerberos configuration based on StackAdvisor recommendation:" +
                "\n\tConfigType: {}\n\tProperty: {}\n\tValue: {}",
              configType, propertyName, recommendedValue);

            if (kerberosConfigProperties == null) {
              kerberosConfigProperties = new HashMap<>();
              kerberosConfigurations.put(configType, kerberosConfigProperties);
            }

            kerberosConfigProperties.put(propertyName, recommendedValue);
          }
        } else {
          String value = kerberosConfigProperties.get(propertyName);
          if ((value == null) ? (recommendedValue != null) : !value.equals(recommendedValue)) {
            // If the recommended value is a change, automatically change it.
            LOG.debug("Updating Kerberos configuration based on StackAdvisor recommendation:" +
                "\n\tConfigType: {}\n\tProperty: {}\n\tOld Value: {}\n\tNew Value: {}",
              configType, propertyName, (value == null) ? "" : value, (recommendedValue == null) ? "" : recommendedValue);

            kerberosConfigProperties.put(propertyName, recommendedValue);
          }
        }
      }
    }
  }
Adds host assignments, recommended by the Stack Advisor, to the configuration map (clusterHostInfo)
for the components specified in the component filter <code>componentFilter</code> (or all if the
component filter is <code>null</code>).

@param cluster         the cluster
@param services        the relevant services to consider
@param componentFilter the set of components to add to the clusterHostInfo structure
@param configurations  the configurations map to update
@throws AmbariException if an error occurs
ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java