From 3572ebd738aa5fa8b0906d75fb12cc6cbb991573 Mon Sep 17 00:00:00 2001 From: Jian He Date: Mon, 27 Jul 2015 16:57:11 -0700 Subject: [PATCH] YARN-3846. RM Web UI queue filter is not working for sub queue. Contributed by Mohammad Shahid Khan --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../server/resourcemanager/webapp/CapacitySchedulerPage.java | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 534c55ae70..4f8484a816 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -695,6 +695,9 @@ Release 2.8.0 - UNRELEASED YARN-3958. TestYarnConfigurationFields should be moved to hadoop-yarn-api module. (Varun Saxena via aajisaka) + YARN-3846. RM Web UI queue filter is not working for sub queue. + (Mohammad Shahid Khan via jianhe) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES 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/CapacitySchedulerPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java index 12a3013298..d8971b7534 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java @@ -516,7 +516,10 @@ public void render(HtmlBlock.Block html) { " $('#cs').bind('select_node.jstree', function(e, data) {", " var q = $('.q', data.rslt.obj).first().text();", " if (q == 'Queue: root') q = '';", - " else q = '^' + q.substr(q.lastIndexOf(':') + 2) + '$';", + " else {", + " q = q.substr(q.lastIndexOf(':') + 2);", + " q = '^' + q.substr(q.lastIndexOf('.') + 1) + '$';", + " }", " $('#apps').dataTable().fnFilter(q, 4, true);", " });", " $('#cs').show();",