private Map<String, String> getDesiredConfigMap(String clusterName, String versionTag,
                                                  String configType, Map<String, String[]> keys,
                                                  Map<String, Object> configProperties)
    throws NoSuchParentResourceException, UnsupportedPropertyException, SystemException {
    if(configProperties == null) {
      configProperties = getConfigProperties(clusterName, versionTag, configType);
    }
    Map<String, String> mConfigs = new HashMap<>();
    if (!configProperties.isEmpty()) {
      Map<String, String> evaluatedProperties = null;
      for (Entry<String, String[]> entry : keys.entrySet()) {
        String propName = null;
        String value = null;

        for (String pname : entry.getValue()) {
          propName = pname;
          // For NN HA the property key contains nameservice id
          for (Map.Entry<String, Object> propertyEntry : configProperties.entrySet()) {
            if (propertyEntry.getKey().startsWith(pname)) {
              value = (String) propertyEntry.getValue();
              break;
            }
          }

          if (null != value) {
            break;
          }
        }

        if (value != null && value.contains("${")) {
          if (evaluatedProperties == null) {
            evaluatedProperties = new HashMap<>();
            for (Map.Entry<String, Object> subentry : configProperties.entrySet()) {
              String keyString = subentry.getKey();
              Object object = subentry.getValue();
              String valueString;
              if (object != null && object instanceof String) {
                valueString = (String) object;
                evaluatedProperties.put(keyString, valueString);
                postProcessPropertyValue(keyString, valueString, evaluatedProperties, null);
              }
            }
          }
        }
        value = postProcessPropertyValue(propName, value, evaluatedProperties, null);
        LOG.debug("PROPERTY -> key: {}, value: {}", propName, value);

        mConfigs.put(entry.getKey(), value);

      }
    }
    return mConfigs;
  }
Gets the desired configuration version tag for the given cluster and config
type.

@param clusterName
         the cluster name
@param configType
         the configuration type (for example <code>hdfs-site</code>).
@return
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java