public String getValueFromDesiredConfigurations(Cluster cluster, String configType, String propertyName) {
    Map<String, DesiredConfig> desiredConfigs = cluster.getDesiredConfigs();
    DesiredConfig desiredConfig = desiredConfigs.get(configType);
    if(desiredConfig != null) {
      Config config = cluster.getConfig(configType, desiredConfig.getTag());
      Map<String, String> configurationProperties = config.getProperties();
      if (null != configurationProperties) {
        String value = configurationProperties.get(propertyName);
        if (null != value) {
          return value;
        }
      }
    }
    return null;
  }
Gets the configuration value referenced by the specified placeholder from
the cluster configuration. This will take a configuration placeholder such
as {{hdfs-site/foo}} and return the value of {@code foo} defined in
{@code hdfs-site}.

@param cluster     the cluster to use when rendering the placeholder value (not
                   {@code null}).
@param placeholder the placeholder value, such as {{hdfs-site/foobar}} (not
                   {@code null} )
@return the configuration value, or {@code null} if none.
@throws AmbariException if there was a problem parsing the placeholder or retrieving the
                        referenced value.
ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java