YARN-9210. RM nodes web page can not display node info. Contributed by Jiandan Yang.

(cherry picked from commit d43df31751)
This commit is contained in:
Weiwei Yang 2019-01-22 10:23:32 +08:00
parent 4edd883d48
commit b61754b1bd
1 changed files with 2 additions and 3 deletions

View File

@ -168,7 +168,7 @@ class NodesPage extends RmView {
nodeTableData.append("<br title='")
.append(String.valueOf(info.getLastHealthUpdate())).append("'>")
.append(Times.format(info.getLastHealthUpdate())).append("\",\"")
.append(info.getHealthReport()).append("\",\"")
.append(StringEscapeUtils.escapeJava(info.getHealthReport())).append("\",\"")
.append(String.valueOf(info.getNumContainers())).append("\",\"")
.append(info.getAllocationTagsSummary()).append("\",\"")
.append("<br title='").append(String.valueOf(usedMemory))
@ -204,9 +204,8 @@ class NodesPage extends RmView {
nodeTableData.length() - 1);
}
nodeTableData.append("]");
String nodeTableDataEscaped = StringEscapeUtils.escapeJava(nodeTableData.toString());
html.script().$type("text/javascript")
.__("var nodeTableData=" + nodeTableDataEscaped).__();
.__("var nodeTableData=" + nodeTableData).__();
tbody.__().__();
}
}