From 9356cf8676fd18f78655e8a6f2e6c946997dbd40 Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Tue, 5 May 2015 13:42:32 +0000 Subject: [PATCH] YARN-3552. RM Web UI shows -1 running containers for completed apps. Contributed by Rohith --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../server/resourcemanager/webapp/FairSchedulerAppsBlock.java | 3 ++- .../hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 287205df0f..97d3208ecd 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -305,6 +305,9 @@ Release 2.8.0 - UNRELEASED YARN-2725. Added test cases of retrying creating znode in ZKRMStateStore. (Tsuyoshi Ozawa via jianhe) + YARN-3552. RM Web UI shows -1 running containers for completed apps + (Rohith via jlowe) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES 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/FairSchedulerAppsBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerAppsBlock.java index 9650dfe8b1..8f8ece06b9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerAppsBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerAppsBlock.java @@ -133,7 +133,8 @@ public FairSchedulerAppsBlock(ResourceManager rm, ViewContext ctx, .append(appInfo.getFinishTime()).append("\",\"") .append(appInfo.getState()).append("\",\"") .append(appInfo.getFinalStatus()).append("\",\"") - .append(appInfo.getRunningContainers()).append("\",\"") + .append(appInfo.getRunningContainers() == -1 ? "N/A" : String + .valueOf(appInfo.getRunningContainers())).append("\",\"") // Progress bar .append("