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 f3ab5b0afad..93e1c974ea8 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 @@ -228,9 +228,10 @@ class CapacitySchedulerPage extends RmView { resourcesUsed = userInfo.getResourceUsageInfo() .getPartitionResourceUsageInfo(nodeLabel).getUsed(); } - ResourceInfo amUsed = (resourceUsages.getAmUsed() == null) - ? new ResourceInfo(Resources.none()) - : resourceUsages.getAmUsed(); + ResourceInfo amUsed = userInfo.getAMResourcesUsed(); + if (amUsed == null) { + amUsed = new ResourceInfo(Resources.none()); + } String highlightIfAsking = userInfo.getIsActive() ? ACTIVE_USER : null; tbody.tr().$style(highlightIfAsking).td(userInfo.getUsername())