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
This commit is contained in:
Sanford Ryza 2014-05-14 06:56:00 +00:00
parent 6fcfde13f3
commit 25118a97d8
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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;
}