From e82e7c597a130bb7a4e4b3132be85b7099961a2d Mon Sep 17 00:00:00 2001 From: Peter Bacsko Date: Fri, 5 Mar 2021 15:56:56 +0100 Subject: [PATCH] YARN-10640. Adjust the queue Configured capacity to Configured weight number for weight mode in UI. Contributed by Qi Zhu. --- .../resourcemanager/webapp/CapacitySchedulerPage.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java index 47c888d189..8212a728e4 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java @@ -159,8 +159,12 @@ private void renderQueueCapacityInfo(ResponseInfo ri, String label) { __("Used Capacity:", appendPercent(resourceUsages.getUsed(), capacities.getUsedCapacity() / 100)) - .__("Configured Capacity:", - capacities.getConfiguredMinResource() == null ? + .__(capacities.getWeight() != -1 ? + "Configured Weight:" : + "Configured Capacity:", + capacities.getWeight() != -1 ? + capacities.getWeight() : + capacities.getConfiguredMinResource() == null ? Resources.none().toString() : capacities.getConfiguredMinResource().toString()) .__("Configured Max Capacity:",