Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YARN-10646. TestCapacitySchedulerWeightMode test descriptor comments doesnt reflect the correct scenario #3339

Merged
merged 3 commits into from
Sep 8, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public static Configuration getCSConfWithLabelsParentUseWeightChildUsePct(
* / / \
* a1 ([x,y]: w=100) b1(no) b2([y,z]: w=100)
*
* Parent uses weight, child uses percentage
* Parent uses percentages, child uses weights
*/
public static Configuration getCSConfWithLabelsParentUsePctChildUseWeight(
Configuration config) {
Expand All @@ -210,9 +210,9 @@ public static Configuration getCSConfWithLabelsParentUsePctChildUseWeight(
// Define top-level queues
conf.setQueues(CapacitySchedulerConfiguration.ROOT,
new String[] { "a", "b" });
conf.setLabeledQueueWeight(CapacitySchedulerConfiguration.ROOT, "x", 100);
conf.setLabeledQueueWeight(CapacitySchedulerConfiguration.ROOT, "y", 100);
conf.setLabeledQueueWeight(CapacitySchedulerConfiguration.ROOT, "z", 100);
conf.setCapacityByLabel(CapacitySchedulerConfiguration.ROOT, "x", 100);
conf.setCapacityByLabel(CapacitySchedulerConfiguration.ROOT, "y", 100);
conf.setCapacityByLabel(CapacitySchedulerConfiguration.ROOT, "z", 100);

conf.setCapacityByLabel(A, RMNodeLabelsManager.NO_LABEL, 10);
conf.setMaximumCapacity(A, 10);
Expand All @@ -228,23 +228,23 @@ public static Configuration getCSConfWithLabelsParentUsePctChildUseWeight(

// Define 2nd-level queues
conf.setQueues(A, new String[] { "a1" });
conf.setCapacityByLabel(A1, RMNodeLabelsManager.NO_LABEL, 100);
conf.setLabeledQueueWeight(A1, RMNodeLabelsManager.NO_LABEL, 1);
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.setLabeledQueueWeight(A1, "x", 1);
conf.setLabeledQueueWeight(A1, "y", 1);

conf.setQueues(B, new String[] { "b1", "b2" });
conf.setCapacityByLabel(B1, RMNodeLabelsManager.NO_LABEL, 50);
conf.setLabeledQueueWeight(B1, RMNodeLabelsManager.NO_LABEL, 1);
conf.setMaximumCapacity(B1, 50);
conf.setAccessibleNodeLabels(B1, RMNodeLabelsManager.EMPTY_STRING_SET);

conf.setCapacityByLabel(B2, RMNodeLabelsManager.NO_LABEL, 50);
conf.setLabeledQueueWeight(B2, RMNodeLabelsManager.NO_LABEL, 1);
conf.setMaximumCapacity(B2, 50);
conf.setAccessibleNodeLabels(B2, toSet("y", "z"));
conf.setCapacityByLabel(B2, "y", 100);
conf.setCapacityByLabel(B2, "z", 100);
conf.setLabeledQueueWeight(B2, "y", 1);
conf.setLabeledQueueWeight(B2, "z", 1);

return conf;
}
Expand Down