From 29ff7fb1400efecfb71491ac97194a229d0af8de Mon Sep 17 00:00:00 2001 From: Giovanni Matteo Fumarola Date: Mon, 13 May 2019 10:57:12 -0700 Subject: [PATCH] YARN-9493. Scheduler Page does not display the right page by query string. Contributed by Wanqiang Ji. --- .../yarn/server/resourcemanager/webapp/SchedulerPageUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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/SchedulerPageUtil.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java index 8c2d271187..7c562cfd87 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java @@ -28,7 +28,8 @@ private void reopenQueue(Block html) { html. script().$type("text/javascript"). __("function reopenQueryNodes() {", - " var currentParam = window.location.href.split('?');", + " var currentParam = decodeURIComponent(window.location.href)" + + ".split('?');", " var tmpCurrentParam = currentParam;", " var queryQueuesString = '';", " if (tmpCurrentParam.length > 1) {", @@ -136,6 +137,7 @@ private void storeExpandedQueue (Block html) { "};", "", "function removeQueueName(queryString, queueName) {", + " queryString = decodeURIComponent(queryString);", " var index = queryString.indexOf(queueName);", " // Finding if queue is present in query param then only remove it", " if (index != -1) {",