From 52148767924baf423172d26f2c6d8a4cfc6e143f Mon Sep 17 00:00:00 2001 From: Xuan Date: Thu, 9 Jul 2015 21:37:33 -0700 Subject: [PATCH] YARN-3888. ApplicationMaster link is broken in RM WebUI when appstate is NEW. Contributed by Bibin A Chundatt --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../server/resourcemanager/webapp/RMAppsBlock.java | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 89b5e9f9d9a..2a9ff98af45 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -607,6 +607,9 @@ Release 2.8.0 - UNRELEASED YARN-3892. Fixed NPE on RMStateStore#serviceStop when CapacityScheduler#serviceInit fails. (Bibin A Chundatt via jianhe) + YARN-3888. ApplicationMaster link is broken in RM WebUI when appstate is NEW. + (Bibin A Chundatt via xgong) + Release 2.7.2 - 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/RMAppsBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java index d252c3089fa..5e80d23674e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java @@ -131,13 +131,15 @@ public class RMAppsBlock extends AppsBlock { String trackingURL = app.getTrackingUrl() == null - || app.getTrackingUrl().equals(UNAVAILABLE) ? null : app - .getTrackingUrl(); + || app.getTrackingUrl().equals(UNAVAILABLE) + || app.getAppState() == YarnApplicationState.NEW ? null : app + .getTrackingUrl(); String trackingUI = app.getTrackingUrl() == null - || app.getTrackingUrl().equals(UNAVAILABLE) ? "Unassigned" : app - .getAppState() == YarnApplicationState.FINISHED + || app.getTrackingUrl().equals(UNAVAILABLE) + || app.getAppState() == YarnApplicationState.NEW ? "Unassigned" + : app.getAppState() == YarnApplicationState.FINISHED || app.getAppState() == YarnApplicationState.FAILED || app.getAppState() == YarnApplicationState.KILLED ? "History" : "ApplicationMaster";