From 798ff2f52b8af77cc13c4580f575049e054870db Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Fri, 1 Sep 2017 11:09:14 -0500 Subject: [PATCH] YARN-7120. CapacitySchedulerPage NPE in "Aggregate scheduler counts" section. Contributed by Eric Payne (cherry picked from commit 99a7f5d451fb91ef956c926f891283f70f0ada1c) --- .../resourcemanager/webapp/CapacitySchedulerPage.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java index ffcd3dff6af..6948b069220 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java @@ -553,8 +553,12 @@ class CapacitySchedulerPage extends RmView { .$class("ui-state-default")._("Queue")._()._()._().tbody(); SchedulerHealth.DetailedInformation di = entry.getValue(); if (di.getTimestamp() != 0) { - containerId = di.getContainerId().toString(); - nodeId = di.getNodeId().toString(); + if (di.getContainerId() != null) { + containerId = di.getContainerId().toString(); + } + if (di.getNodeId() != null) { + nodeId = di.getNodeId().toString(); + } queue = di.getQueue(); } tbody.$class("ui-widget-content").tr()