You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/08/24 01:27:30 UTC

[GitHub] [hadoop] myhonor2013 commented on a change in pull request #2238: YARN-8746. fix overview in ui2 doesn't display GPU usage info when using Fairscheduler

myhonor2013 commented on a change in pull request #2238:
URL: https://github.com/apache/hadoop/pull/2238#discussion_r475297726



##########
File path: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/ClusterMetricsInfo.java
##########
@@ -134,6 +135,11 @@ public ClusterMetricsInfo(final ResourceScheduler rs) {
       this.totalMB = availableMB + allocatedMB;
       this.totalVirtualCores = availableVirtualCores + allocatedVirtualCores;
     }
+    if (rs instanceof FairScheduler) {
+      FairScheduler fs = (FairScheduler) rs;
+      totalUsedResourcesAcrossPartition = new ResourceInfo(fs.getQueueManager().getRootQueue().getResourceUsage());
+      totalClusterResourcesAcrossPartition = new ResourceInfo(fs.getClusterResource());
+    }

Review comment:
       It seems we also need to add the snippet below to the FairScheduler conditional branch if we move the code segment to else if clause
   `
   this.totalMB = availableMB + allocatedMB;
   this.totalVirtualCores = availableVirtualCores + allocatedVirtualCores;
   `




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org