You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Szilard Nemeth (Jira)" <ji...@apache.org> on 2021/09/08 14:12:00 UTC
[jira] [Updated] (YARN-10646) TestCapacitySchedulerWeightMode test
descriptor comments doesn't reflect the correct scenario
[ https://issues.apache.org/jira/browse/YARN-10646?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Szilard Nemeth updated YARN-10646:
----------------------------------
Fix Version/s: 3.4.0
> TestCapacitySchedulerWeightMode test descriptor comments doesn't reflect the correct scenario
> ---------------------------------------------------------------------------------------------
>
> Key: YARN-10646
> URL: https://issues.apache.org/jira/browse/YARN-10646
> Project: Hadoop YARN
> Issue Type: Sub-task
> Environment:
> Reporter: Benjamin Teke
> Assignee: Benjamin Teke
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.4.0
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> There is a mixup in TestCapacitySchedulerWeightMode in the configuration creator method comments and the test case descriptor comments. See the following code:
> {code:java}
> /*
> * Queue structure:
> * root (*)
> * _______________________
> * / \
> * a x(=100%), y(50%) b y(=50%), z(=100%)
> * ________________ ______________
> * / / \
> * a1 ([x,y]: w=100) b1(no) b2([y,z]: w=100)
> *
> * Parent uses weight, child uses percentage
> */
> public static Configuration getCSConfWithLabelsParentUsePctChildUseWeight(
> Configuration config) {
> {code}
> While inside the method all the queues (including the second level ones) are configured with capacity, only some labels are configured with weights:
> {code:java}
> conf.setLabeledQueueWeight(CapacitySchedulerConfiguration.ROOT, "x", 100);
> conf.setLabeledQueueWeight(CapacitySchedulerConfiguration.ROOT, "y", 100);
> conf.setLabeledQueueWeight(CapacitySchedulerConfiguration.ROOT, "z", 100);
> ...
> conf.setQueues(A, new String[] { "a1" });
> conf.setCapacityByLabel(A1, RMNodeLabelsManager.NO_LABEL, 100);
> conf.setMaximumCapacity(A1, 100);
> conf.setAccessibleNodeLabels(A1, toSet("x", "y"));
> conf.setDefaultNodeLabelExpression(A1, "x");
> conf.setCapacityByLabel(A1, "x", 100);
> conf.setCapacityByLabel(A1, "y", 100);
> conf.setQueues(B, new String[] { "b1", "b2" });
> conf.setCapacityByLabel(B1, RMNodeLabelsManager.NO_LABEL, 50);
> conf.setMaximumCapacity(B1, 50);
> conf.setAccessibleNodeLabels(B1, RMNodeLabelsManager.EMPTY_STRING_SET);
> conf.setCapacityByLabel(B2, RMNodeLabelsManager.NO_LABEL, 50);
> conf.setMaximumCapacity(B2, 50);
> conf.setAccessibleNodeLabels(B2, toSet("y", "z"));
> conf.setCapacityByLabel(B2, "y", 100);
> conf.setCapacityByLabel(B2, "z", 100);
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org