[
https://issues.apache.org/jira/browse/YARN-10641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17288456#comment-17288456
]
Benjamin Teke commented on YARN-10641:
--------------------------------------
[~zhuqi], thanks for working on this, this indeed seems to be an issue.
I've checked the latest patch, and I've a question. Consider the following code
snippet (AbstractCSQueue#updateMaxAppRelatedField):
{code:java}
if (maxApplications < 0) {
int maxGlobalPerQueueApps = conf.getGlobalMaximumApplicationsPerQueue();
if (maxGlobalPerQueueApps > 0) {
// In absolute mode ,should shrink when change to corresponding
capacity.
maxApplications = this.capacityConfigType !=
CapacityConfigType.ABSOLUTE_RESOURCE ?
maxGlobalPerQueueApps : Math.max(maxApplications,
(int) (conf.getGlobalMaximumApplicationsPerQueue() * queueCapacities
.getAbsoluteCapacity(label)));
} else{
//Here we should get the max of label abs capacites.
maxApplications = Math.max(maxApplications,
(int) (conf.getMaximumSystemApplications() * queueCapacities
.getAbsoluteCapacity(label)));
}
}
{code}
In the if block is the second part (the Math.max call) actually necessary in
the ternary operator? Because in this block the *maxApplications < 0* condition
is already true.
Also in the same method at the log.info call there seems to be a debug message
(_update max app related_). Is it intentional?
> Refactor the max app related update, and fix maxApllications update error
> when add new queues.
> ----------------------------------------------------------------------------------------------
>
> Key: YARN-10641
> URL: https://issues.apache.org/jira/browse/YARN-10641
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Qi Zhu
> Assignee: Qi Zhu
> Priority: Critical
> Attachments: YARN-10641.001.patch, YARN-10641.002.patch,
> YARN-10641.003.patch, image-2021-02-20-15-49-58-677.png,
> image-2021-02-20-15-53-51-099.png, image-2021-02-20-15-55-44-780.png,
> image-2021-02-20-16-29-18-519.png, image-2021-02-20-16-31-13-714.png
>
>
> When refactor the update logic in YARN-10504 .
> The update max applications based abs/cap is wrong, this should be fixed,
> because the max applications is key part to limit applications in CS.
> For example:
> When adding a dynamic queue, the other children's max app of parent queue are
> not updated correctly:
> !image-2021-02-20-15-53-51-099.png|width=639,height=509!
> The new added queue's max app will updated correctly:
> !image-2021-02-20-15-55-44-780.png|width=542,height=426!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]