[
https://issues.apache.org/jira/browse/YARN-5746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15612688#comment-15612688
]
Daniel Templeton commented on YARN-5746:
----------------------------------------
Thanks, [~xgong]. Couple of comments:
* Let's collapse these nested conditionals into an _else if_: {code} }
else {
if (configuredState == QueueState.RUNNING
&& parentState == QueueState.STOPPED) {
throw new IllegalArgumentException(
"Illegal" + " State of " + configuredState
+ " for children of queue: " + queueName
+ ". The state of its parent queue: " + parent.getQueueName()
+ " is " + parentState);
} else {
this.state = configuredState;
}
}{code}
* It would be cleaner if {{getState()}} were rewritten to use
{{getConfiguredState()}}
> The state of the parentQueue and its childQueues should be synchronized.
> ------------------------------------------------------------------------
>
> Key: YARN-5746
> URL: https://issues.apache.org/jira/browse/YARN-5746
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: resourcemanager
> Reporter: Xuan Gong
> Assignee: Xuan Gong
> Attachments: YARN-5746.1.patch, YARN-5746.2.patch
>
>
> The state of the parentQueue and its childQeues need to be synchronized.
> * If the state of the parentQueue becomes STOPPED, the state of its
> childQueue need to become STOPPED as well.
> * If we change the state of the queue to RUNNING, we should make sure the
> state of all its ancestor must be RUNNING. Otherwise, we need to fail this
> operation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]