protected boolean isQueueNameValid(Cluster cluster, Set<String> validLeafQueues, String queueNameProperty, String configType) {
    Config site = cluster.getDesiredConfigByType(configType);
    Map<String, String> properties = site.getProperties();
    boolean result = properties.containsKey(queueNameProperty) && validLeafQueues.contains(properties.get(queueNameProperty));
    if (!result){
      LOG.info("Queue name " + queueNameProperty + " in " + configType + " not defined or not corresponds to valid capacity-scheduler queue");
    }
    return result;
  }
Validate queueNameProperty exists for configType in cluster and corresponds to one of validLeafQueues
@param cluster cluster to operate with
@param validLeafQueues Set of YARN capacity-scheduler leaf queues
@param queueNameProperty queue name property to check and update
@param configType config type name
@return
ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java