private String getDesiredConfigVersion(String clusterName,
      String configType) {

    String versionTag = ConfigHelper.FIRST_VERSION_TAG;

    try {
      Clusters clusters = managementController.getClusters();
      Cluster cluster = clusters.getCluster(clusterName);
      Map<String, DesiredConfig> desiredConfigs = cluster.getDesiredConfigs();

      DesiredConfig config = desiredConfigs.get(configType);
      if (config != null) {
        versionTag = config.getTag();
      }
    } catch (AmbariException ambariException) {
      LOG.error(
          "Unable to lookup the desired configuration tag for {} on cluster {}, defaulting to {}",
          configType, clusterName, versionTag, ambariException);
    }

    return versionTag;
  }
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