tomicooler commented on a change in pull request #3858:
URL: https://github.com/apache/hadoop/pull/3858#discussion_r782215149
##########
File path:
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerQueueManager.java
##########
@@ -238,92 +236,61 @@ static CSQueue parseQueue(
CSQueueStore oldQueues,
QueueHook hook) throws IOException {
CSQueue queue;
- String fullQueueName = (parent == null) ?
- queueName :
- (parent.getQueuePath() + "." + queueName);
+ String fullQueueName = (parent == null) ? queueName :
+ (QueuePath.createFromQueues(parent.getQueuePath(),
queueName).getFullPath());
String[] staticChildQueueNames = conf.getQueues(fullQueueName);
List<String> childQueueNames = staticChildQueueNames != null ?
Arrays.asList(staticChildQueueNames) : Collections.emptyList();
-
- boolean isReservableQueue = conf.isReservable(fullQueueName);
- boolean isAutoCreateEnabled = conf.isAutoCreateChildQueueEnabled(
- fullQueueName);
- // if a queue is eligible for auto queue creation v2
- // it must be a ParentQueue (even if it is empty)
- boolean isAutoQueueCreationV2Enabled = conf.isAutoQueueCreationV2Enabled(
- fullQueueName);
- boolean isDynamicParent = false;
-
- // Auto created parent queues might not have static children, but they
- // must be kept as a ParentQueue
CSQueue oldQueue = oldQueues.get(fullQueueName);
- if (oldQueue instanceof ParentQueue) {
- isDynamicParent = ((ParentQueue) oldQueue).isDynamicQueue();
- }
- if (childQueueNames.size() == 0 && !isDynamicParent &&
- !isAutoQueueCreationV2Enabled) {
- if (null == parent) {
- throw new IllegalStateException(
- "Queue configuration missing child queue names for " + queueName);
+ boolean isReservableQueue = conf.isReservable(fullQueueName);
+ boolean isAutoCreateEnabled =
conf.isAutoCreateChildQueueEnabled(fullQueueName);
+ // if a queue is eligible for auto queue creation v2 it must be a
ParentQueue
+ // (even if it is empty)
+ final boolean isDynamicParent = oldQueue instanceof ParentQueue &&
oldQueue.isDynamicQueue();
+ boolean isAutoQueueCreationEnabledParent = isDynamicParent ||
conf.isAutoQueueCreationV2Enabled(
+ fullQueueName) || isAutoCreateEnabled;
+
+ if (childQueueNames.size() == 0 && !isAutoQueueCreationEnabledParent) {
+ if (parent == null) {
+ throw new IllegalStateException("Queue configuration missing child
queue names for "
Review comment:
Previously this was thrown regardless of the isAutoCreateEnabled
(childQueueNames.size() == 0 && !isDynamicParent && !
isAutoQueueCreationV2Enabled && parent == null).
Now it's only thrown when isAutoCreateEnabled is also false. I'm not sure if
this is a problem or not, it's hard to comprehend what the exception is for:
"Queue configuration missing child queue names for"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]