Procházet zdrojové kódy

YARN-8443. Total #VCores in cluster metrics is wrong when CapacityScheduler reserved some containers. Contributed by Tao Yang.

Weiwei Yang před 7 roky
rodič
revize
440140cea6

+ 1 - 1
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

@@ -101,7 +101,7 @@ public class ClusterMetricsInfo {
       CapacityScheduler cs = (CapacityScheduler) rs;
       CapacityScheduler cs = (CapacityScheduler) rs;
       this.totalMB = availableMB + allocatedMB + reservedMB;
       this.totalMB = availableMB + allocatedMB + reservedMB;
       this.totalVirtualCores =
       this.totalVirtualCores =
-          availableVirtualCores + allocatedVirtualCores + containersReserved;
+          availableVirtualCores + allocatedVirtualCores + reservedVirtualCores;
       // TODO, add support of other schedulers to get total used resources
       // TODO, add support of other schedulers to get total used resources
       // across partition.
       // across partition.
       if (cs.getRootQueue() != null
       if (cs.getRootQueue() != null