From a276f68b9278a318aa7f45886402917ca802aa4f Mon Sep 17 00:00:00 2001 From: Alejandro Abdelnur Date: Fri, 21 Dec 2012 16:20:12 +0000 Subject: [PATCH] YARN-283. Fair scheduler fails to get queue info without root prefix. (sandyr via tucu) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1424998 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../server/resourcemanager/scheduler/fair/QueueManager.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 9452412894..78990334e6 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -152,6 +152,9 @@ Release 2.0.3-alpha - Unreleased YARN-282. Fair scheduler web UI double counts Apps Submitted. (sandyr via tucu) + YARN-283. Fair scheduler fails to get queue info without root prefix. + (sandyr via tucu) + Release 2.0.2-alpha - 2012-09-07 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/scheduler/fair/QueueManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java index 5da1d4fd5b..8f27531ad2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java @@ -227,6 +227,9 @@ public FSQueue getQueue(String name) { * Return whether a queue exists already. */ public boolean exists(String name) { + if (!name.startsWith(ROOT_QUEUE + ".") && !name.equals(ROOT_QUEUE)) { + name = ROOT_QUEUE + "." + name; + } synchronized (queues) { return queues.containsKey(name); }