From 99a7f5d451fb91ef956c926f891283f70f0ada1c 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 --- .../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 93e1c974ea..3c00cb8fa0 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 @@ -556,8 +556,12 @@ public void render(HtmlBlock.Block html) { .$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()