protected void updateQueueName(Cluster cluster, Set<String> validLeafQueues, String queueNameProperty, String configType) throws AmbariException {
    String recommendQueue = validLeafQueues.iterator().next();
    LOG.info("Update " + queueNameProperty + " in " + configType + " set to " + recommendQueue);
    Map<String, String> updates = Collections.singletonMap(queueNameProperty, recommendQueue);
    updateConfigurationPropertiesForCluster(cluster, configType, updates, true, true);
  }
Update property queueNameProperty from configType of cluster to first 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
@throws AmbariException if an error occurs while updating the configurations
ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java