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(
boolean isFairSchedulerPage, boolean isResourceManager) {
// default progress column index is 11
String progressIndex = "[11]";
StringBuilder sb = new StringBuilder();
sb.append("[\n")
.append("{'sType':'natural', 'aTargets': [0]")
.append(", 'mRender': parseHadoopID }")
.append("\n, {'sType':'num-ignore-str', 'aTargets': [6, 7, 8]")
.append(", 'mRender': renderHadoopDate }")
.append("\n, {'sType':'num-ignore-str', 'aTargets': [11, 12, 13, 14, 15] }")
.append("\n, {'sType':'numeric', bSearchable:false, 'aTargets':");
if (isFairSchedulerPage) {
sb.append("[15]");
} else if (isResourceManager) {
sb.append("[17]");
} else {
sb.append("[10]");
.append(", 'mRender': renderHadoopDate }");
if (isResourceManager) {
// Update following line if any column added in RM page before column 11
sb.append("\n, {'sType':'num-ignore-str', 'aTargets': [11, 12, 13, 14, 15] }");
// set progress column index to 18
progressIndex = "[18]";
} else if (isFairSchedulerPage) {
// Update following line if any column added in scheduler page before column 11
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 }]");
return sb.toString();
}