hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jh...@apache.org
Subject hadoop git commit: YARN-9036. Escape newlines in health report in YARN UI. Contributed by Keqiu Hu
Date Fri, 30 Nov 2018 18:19:20 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.9 cebae214a -> a541aee62


YARN-9036. Escape newlines in health report in YARN UI. Contributed by Keqiu Hu

(cherry picked from commit 59be7cfda94f8793edfedc7679a2ac8a003af970)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a541aee6
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a541aee6
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a541aee6

Branch: refs/heads/branch-2.9
Commit: a541aee62cf965e72f2daf53b311e8360351bac3
Parents: cebae21
Author: Jonathan Hung <jhung@jhung-ld3.linkedin.biz>
Authored: Fri Nov 30 10:04:06 2018 -0800
Committer: Jonathan Hung <jyhung2357@gmail.com>
Committed: Fri Nov 30 10:19:12 2018 -0800

----------------------------------------------------------------------
 .../hadoop/yarn/server/resourcemanager/webapp/NodesPage.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a541aee6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java
----------------------------------------------------------------------
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/NodesPage.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java
index c03df63..c3a4897 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java
@@ -19,6 +19,7 @@
 package org.apache.hadoop.yarn.server.resourcemanager.webapp;
 
 import com.google.inject.Inject;
+import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.hadoop.util.StringUtils;
 import org.apache.hadoop.yarn.api.records.NodeState;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
@@ -200,8 +201,9 @@ class NodesPage extends RmView {
             nodeTableData.length() - 1);
       }
       nodeTableData.append("]");
+      String nodeTableDataEscaped = StringEscapeUtils.escapeJava(nodeTableData.toString());
       html.script().$type("text/javascript")
-          ._("var nodeTableData=" + nodeTableData)._();
+          ._("var nodeTableData=" + nodeTableDataEscaped)._();
       tbody._()._();
     }
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message