diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerWeightMode.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerWeightMode.java index 171123a6ce..a5d80dc27e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerWeightMode.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerWeightMode.java @@ -198,9 +198,9 @@ public static Configuration getCSConfWithLabelsParentUseWeightChildUsePct( * a x(=100%), y(50%) b y(=50%), z(=100%) * ________________ ______________ * / / \ - * a1 ([x,y]: w=100) b1(no) b2([y,z]: w=100) + * a1 ([x,y]: w=1) b1(no) b2([y,z]: w=1) * - * Parent uses weight, child uses percentage + * Parent uses percentages, child uses weights */ public static Configuration getCSConfWithLabelsParentUsePctChildUseWeight( Configuration config) { @@ -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); @@ -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; }