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

(Cherry picked from commit 440140cea6)
This commit is contained in:
Weiwei Yang 2018-06-25 09:15:31 +08:00
parent 3b3a85002d
commit bfdbc9dea2
1 changed files with 1 additions and 1 deletions

View File

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