From b2e6cf607f1712d103520ca6b3ff21ecc07cd265 Mon Sep 17 00:00:00 2001 From: Jian He Date: Wed, 15 Apr 2015 13:52:50 -0700 Subject: [PATCH] YARN-3404. Display queue name on application page. Contributed by Ryu Kobayashi --- hadoop-yarn-project/CHANGES.txt | 2 ++ .../org/apache/hadoop/yarn/server/webapp/AppBlock.java | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 4a29b77abd9..7ec4b503778 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -131,6 +131,8 @@ Release 2.8.0 - UNRELEASED YARN-3394. Enrich WebApplication proxy documentation. (Naganarasimha G R via jianhe) + YARN-3404. Display queue name on application page. (Ryu Kobayashi via jianhe) + OPTIMIZATIONS YARN-3339. TestDockerContainerExecutor should pull a single image and not diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java index d5a3dd822e0..0d80339344e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java @@ -54,6 +54,7 @@ import org.apache.hadoop.yarn.webapp.YarnWebParams; import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.util.WebAppUtils; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -157,8 +158,11 @@ public class AppBlock extends HtmlBlock { html.script().$type("text/javascript")._(script.toString())._(); } + String schedulerPath = WebAppUtils.getResolvedRMWebAppURLWithScheme(conf) + + "/cluster/scheduler?openQueues=" + app.getQueue(); + ResponseInfo overviewTable = info("Application Overview") - ._("User:", app.getUser()) + ._("User:", schedulerPath, app.getUser()) ._("Name:", app.getName()) ._("Application Type:", app.getType()) ._("Application Tags:", @@ -167,6 +171,7 @@ public class AppBlock extends HtmlBlock { "YarnApplicationState:", app.getAppState() == null ? UNAVAILABLE : clarifyAppState(app .getAppState())) + ._("Queue:", schedulerPath, app.getQueue()) ._("FinalStatus Reported by AM:", clairfyAppFinalStatus(app.getFinalAppStatus())) ._("Started:", Times.format(app.getStartedTime()))