YARN-9069. Fix SchedulerInfo#getSchedulerType for custom schedulers. Contributed by Bilwa S T.

(cherry picked from commit 07142f54a8c7f70857e99c041f3a2a5189c809b5)
This commit is contained in:
bibinchundatt 2018-11-29 22:02:59 +05:30
parent e7fa638fe8
commit 8be2d16b94

View File

@ -53,6 +53,8 @@ public SchedulerInfo(final ResourceManager rm) {
this.schedulerName = "Fair Scheduler"; this.schedulerName = "Fair Scheduler";
} else if (rs instanceof FifoScheduler) { } else if (rs instanceof FifoScheduler) {
this.schedulerName = "Fifo Scheduler"; this.schedulerName = "Fifo Scheduler";
} else {
this.schedulerName = rs.getClass().getSimpleName();
} }
this.minAllocResource = new ResourceInfo(rs.getMinimumResourceCapability()); this.minAllocResource = new ResourceInfo(rs.getMinimumResourceCapability());
this.maxAllocResource = new ResourceInfo(rs.getMaximumResourceCapability()); this.maxAllocResource = new ResourceInfo(rs.getMaximumResourceCapability());