Browse Source

YARN-10318. ApplicationHistory Web UI incorrect column indexing. Contributed by Andras Gyori

Szilard Nemeth 5 years ago
parent
commit
d88a6eebf2

+ 6 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppsBlock.java

@@ -150,7 +150,8 @@ public class AppsBlock extends HtmlBlock {
     TBODY<TABLE<Hamlet>> tbody =
     TBODY<TABLE<Hamlet>> tbody =
         html.table("#apps").thead().tr().th(".id", "ID").th(".user", "User")
         html.table("#apps").thead().tr().th(".id", "ID").th(".user", "User")
           .th(".name", "Name").th(".type", "Application Type")
           .th(".name", "Name").th(".type", "Application Type")
-          .th(".queue", "Queue").th(".priority", "Application Priority")
+          .th(".apptag", "Application Tags").th(".queue", "Queue")
+          .th(".priority", "Application Priority")
           .th(".starttime", "StartTime")
           .th(".starttime", "StartTime")
           .th(".launchtime", "LaunchTime")
           .th(".launchtime", "LaunchTime")
           .th(".finishtime", "FinishTime")
           .th(".finishtime", "FinishTime")
@@ -185,6 +186,10 @@ public class AppsBlock extends HtmlBlock {
         .append(
         .append(
           StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(app
           StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(app
             .getType())))
             .getType())))
+          .append("\",\"")
+          .append(
+              StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(
+                  app.getApplicationTags() == null ? "" : app.getApplicationTags())))
         .append("\",\"")
         .append("\",\"")
         .append(
         .append(
           StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(app
           StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(app