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()
.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())