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:
parent
3b3a85002d
commit
bfdbc9dea2
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue