YARN-7120. CapacitySchedulerPage NPE in "Aggregate scheduler counts" section. Contributed by Eric Payne

(cherry picked from commit 99a7f5d451)
This commit is contained in:
Jason Lowe 2017-09-01 11:09:14 -05:00
parent 119220b88f
commit 57b5b186ce
1 changed files with 6 additions and 2 deletions

View File

@ -556,8 +556,12 @@ class CapacitySchedulerPage extends RmView {
.$class("ui-state-default")._("Queue")._()._()._().tbody(); .$class("ui-state-default")._("Queue")._()._()._().tbody();
SchedulerHealth.DetailedInformation di = entry.getValue(); SchedulerHealth.DetailedInformation di = entry.getValue();
if (di.getTimestamp() != 0) { if (di.getTimestamp() != 0) {
containerId = di.getContainerId().toString(); if (di.getContainerId() != null) {
nodeId = di.getNodeId().toString(); containerId = di.getContainerId().toString();
}
if (di.getNodeId() != null) {
nodeId = di.getNodeId().toString();
}
queue = di.getQueue(); queue = di.getQueue();
} }
tbody.$class("ui-widget-content").tr() tbody.$class("ui-widget-content").tr()