YARN-9285: RM UI progress column is of wrong type. Contributed by Ahmed Hussein.

(cherry picked from commit b094b94d43)
This commit is contained in:
Eric E Payne 2019-05-02 19:39:26 +00:00
parent 86fb5e1c8e
commit 41ffaea342
1 changed files with 15 additions and 9 deletions

View File

@ -47,21 +47,27 @@ public class WebPageUtils {
private static String getAppsTableColumnDefs( private static String getAppsTableColumnDefs(
boolean isFairSchedulerPage, boolean isResourceManager) { boolean isFairSchedulerPage, boolean isResourceManager) {
// default progress column index is 11
String progressIndex = "[11]";
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("[\n") sb.append("[\n")
.append("{'sType':'natural', 'aTargets': [0]") .append("{'sType':'natural', 'aTargets': [0]")
.append(", 'mRender': parseHadoopID }") .append(", 'mRender': parseHadoopID }")
.append("\n, {'sType':'num-ignore-str', 'aTargets': [6, 7, 8]") .append("\n, {'sType':'num-ignore-str', 'aTargets': [6, 7, 8]")
.append(", 'mRender': renderHadoopDate }") .append(", 'mRender': renderHadoopDate }");
.append("\n, {'sType':'num-ignore-str', 'aTargets': [11, 12, 13, 14, 15] }") if (isResourceManager) {
.append("\n, {'sType':'numeric', bSearchable:false, 'aTargets':"); // Update following line if any column added in RM page before column 11
if (isFairSchedulerPage) { sb.append("\n, {'sType':'num-ignore-str', 'aTargets': [11, 12, 13, 14, 15] }");
sb.append("[15]"); // set progress column index to 18
} else if (isResourceManager) { progressIndex = "[18]";
sb.append("[17]"); } else if (isFairSchedulerPage) {
} else { // Update following line if any column added in scheduler page before column 11
sb.append("[10]"); sb.append("\n, {'sType':'num-ignore-str', 'aTargets': [11, 12, 13, 14, 15] }");
// set progress column index to 16
progressIndex = "[16]";
} }
sb.append("\n, {'sType':'numeric', bSearchable:false, 'aTargets':");
sb.append(progressIndex);
sb.append(", 'mRender': parseHadoopProgress }]"); sb.append(", 'mRender': parseHadoopProgress }]");
return sb.toString(); return sb.toString();
} }