Pārlūkot izejas kodu

YARN-2042. String shouldn't be compared using == in QueuePlacementRule#NestedUserQueue#getQueueForApp (Chen He via Sandy Ryza)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1594486 13f79535-47bb-0310-9956-ffa450edef68
Sanford Ryza 11 gadi atpakaļ
vecāks
revīzija
25118a97d8

+ 3 - 0
hadoop-yarn-project/CHANGES.txt

@@ -102,6 +102,9 @@ Release 2.5.0 - UNRELEASED
     YARN-2016. Fix a bug in GetApplicationsRequestPBImpl to add the missed fields
     to proto. (Junping Du via jianhe)
 
+    YARN-2042. String shouldn't be compared using == in
+    QueuePlacementRule#NestedUserQueue#getQueueForApp (Chen He via Sandy Ryza)
+
 Release 2.4.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueuePlacementRule.java

@@ -227,7 +227,7 @@ public abstract class QueuePlacementRule {
       String queueName = nestedRule.assignAppToQueue(requestedQueue, user,
           groups, configuredQueues);
       
-      if (queueName != null && queueName != "") {
+      if (queueName != null && queueName.length() != 0) {
         if (!queueName.startsWith("root.")) {
           queueName = "root." + queueName;
         }