private boolean getDesiredConfigurationKeyPresence(Cluster cluster,
      String configType, String propertyKey) {

    Map<String, DesiredConfig> desiredConfigs = cluster.getDesiredConfigs();
    DesiredConfig desiredConfig = desiredConfigs.get(configType);
    if (null == desiredConfig) {
      return false;
    }

    Config config = cluster.getConfig(configType, desiredConfig.getTag());
    if (null == config) {
      return false;
    }
    return config.getProperties().containsKey(propertyKey);
  }
Gets the property presence state
@param cluster
         the cluster (not {@code null}).
@param configType
         the configuration type (ie hdfs-site) (not {@code null}).
@param propertyKey
         the key to retrieve (not {@code null}).
@return {@code true} if property key exists or {@code false} if not.
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java