YARN-7116. CapacityScheduler Web UI: Queue's AM usage is always show on per-user's AM usage. Contributed by Wangda Tan.

This commit is contained in:
Sunil G 2017-08-31 18:42:01 +05:30
parent ac12e153a8
commit f9e0cc8cdc

View File

@ -228,9 +228,10 @@ protected void render(Block html) {
resourcesUsed = userInfo.getResourceUsageInfo() resourcesUsed = userInfo.getResourceUsageInfo()
.getPartitionResourceUsageInfo(nodeLabel).getUsed(); .getPartitionResourceUsageInfo(nodeLabel).getUsed();
} }
ResourceInfo amUsed = (resourceUsages.getAmUsed() == null) ResourceInfo amUsed = userInfo.getAMResourcesUsed();
? new ResourceInfo(Resources.none()) if (amUsed == null) {
: resourceUsages.getAmUsed(); amUsed = new ResourceInfo(Resources.none());
}
String highlightIfAsking = String highlightIfAsking =
userInfo.getIsActive() ? ACTIVE_USER : null; userInfo.getIsActive() ? ACTIVE_USER : null;
tbody.tr().$style(highlightIfAsking).td(userInfo.getUsername()) tbody.tr().$style(highlightIfAsking).td(userInfo.getUsername())