From 60ed024200d410999cc6ba305008993f7e549d63 Mon Sep 17 00:00:00 2001 From: xihuanbanku Date: Sun, 19 Feb 2023 20:00:29 +0800 Subject: [PATCH] [YARN-11443]"State" column in YARN RM page bug "State" column in YARN RM web page shows "undefined" while using fairscheduler. --- .../hadoop/yarn/server/webapp/WebPageUtils.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/WebPageUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/WebPageUtils.java index 12c73c12427..b2d03121137 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/WebPageUtils.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/WebPageUtils.java @@ -58,9 +58,13 @@ public class WebPageUtils { StringBuilder sb = new StringBuilder(); sb.append("[\n") .append("{'sType':'natural', 'aTargets': [0], ") - .append("'mRender': parseHadoopID },\n") - .append("{'sType':'num-ignore-str', 'aTargets': [7, 8, 9], ") - .append("'mRender': renderHadoopDate },\n"); + .append("'mRender': parseHadoopID },\n"); + if (isResourceManager) { + sb.append("{'sType':'num-ignore-str', 'aTargets': [7, 8, 9], "); + } else if (isFairSchedulerPage) { + sb.append("{'sType':'num-ignore-str', 'aTargets': [6, 7], "); + } + sb.append("'mRender': renderHadoopDate },\n"); if (isResourceManager) { // Update following line if any column added in RM page before column 11 sb.append("{'sType':'num-ignore-str', ") @@ -144,4 +148,4 @@ public class WebPageUtils { return enabledTools; } -} \ No newline at end of file +}