Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.4.0
-
Reviewed
Description
We saw an exception when using queue mutation APIs:
2020-11-13 16:47:46,327 WARN org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServices: CapacityScheduler configuration validation failed:java.io.IOException: Queue root.am2cmQueueSecond not found
Which comes from this code:
List<String> siblingQueues = getSiblingQueues(queueToRemove, proposedConf); if (!siblingQueues.contains(queueName)) { throw new IOException("Queue " + queueToRemove + " not found"); }
(Inside MutableCSConfigurationProvider)
If you look at the method:
private List<String> getSiblingQueues(String queuePath, Configuration conf) { String parentQueue = queuePath.substring(0, queuePath.lastIndexOf('.')); String childQueuesKey = CapacitySchedulerConfiguration.PREFIX + parentQueue + CapacitySchedulerConfiguration.DOT + CapacitySchedulerConfiguration.QUEUES; return new ArrayList<>(conf.getStringCollection(childQueuesKey)); }
And here's capacity-scheduler.xml I got
<property><name>yarn.scheduler.capacity.root.queues</name><value>default, q1, q2</value></property>
You can notice there're spaces between default, q1, a2
So conf.getStringCollection returns:
default
<space>q1
...
Which causes match issue when we try to delete the queue.