From e2530de4ea7095b6157cd994740e2eaf55156a45 Mon Sep 17 00:00:00 2001 From: Sanford Ryza Date: Sat, 8 Mar 2014 05:12:45 +0000 Subject: [PATCH] YARN-1790. Fair Scheduler UI not showing apps table (bc Wong via Sandy Ryza) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1575487 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-yarn-project/CHANGES.txt | 2 ++ .../resourcemanager/webapp/FairSchedulerAppsBlock.java | 5 ++++- .../server/resourcemanager/webapp/FairSchedulerPage.java | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 9d56a59bedd..1a92e125c6e 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -42,6 +42,8 @@ Release 2.5.0 - UNRELEASED YARN-1718. Fix a couple isTerminals in Fair Scheduler queue placement rules (Sandy Ryza) + YARN-1790. Fair Scheduler UI not showing apps table (bc Wong via Sandy Ryza) + Release 2.4.0 - 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 195cb53b76e..c36e311e384 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 @@ -72,6 +72,7 @@ public class FairSchedulerAppsBlock extends HtmlBlock { th(".id", "ID"). th(".user", "User"). th(".name", "Name"). + th(".type", "Application Type"). th(".queue", "Queue"). th(".fairshare", "Fair Share"). th(".starttime", "StartTime"). @@ -92,7 +93,7 @@ public class FairSchedulerAppsBlock extends HtmlBlock { } StringBuilder appsTableData = new StringBuilder("[\n"); for (RMApp app : apps.values()) { - if (reqAppStates != null && !reqAppStates.contains(app.getState())) { + if (reqAppStates != null && !reqAppStates.contains(app.createApplicationState())) { continue; } AppInfo appInfo = new AppInfo(app, true, WebAppUtils.getHttpSchemePrefix(conf)); @@ -107,6 +108,8 @@ public class FairSchedulerAppsBlock extends HtmlBlock { appInfo.getUser()))).append("\",\"") .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml( appInfo.getName()))).append("\",\"") + .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml( + appInfo.getApplicationType()))).append("\",\"") .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml( appInfo.getQueue()))).append("\",\"") .append(fairShare).append("\",\"") 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/FairSchedulerPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerPage.java index 73ab42005de..a4f2e4d8406 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerPage.java @@ -246,7 +246,7 @@ public class FairSchedulerPage extends RmView { .append("{'sType':'numeric', 'aTargets': [0]") .append(", 'mRender': parseHadoopID }") - .append("\n, {'sType':'numeric', 'aTargets': [5, 6]") + .append("\n, {'sType':'numeric', 'aTargets': [6, 7]") .append(", 'mRender': renderHadoopDate }") .append("\n, {'sType':'numeric', bSearchable:false, 'aTargets': [9]")