YARN-3487. CapacityScheduler scheduler lock obtained unnecessarily when calling getQueue (Jason Lowe via wangda)

(cherry picked from commit f47a5763ac)
(cherry picked from commit 3316cd4357)
(cherry picked from commit 24d45ee9544abcfcf9e611ab835ec2f824333670)
This commit is contained in:
Wangda Tan 2015-04-17 17:22:27 -07:00 committed by Vinod Kumar Vavilapalli
parent 61f2ddb125
commit e081593042
2 changed files with 5 additions and 6 deletions

View File

@ -126,6 +126,9 @@ Release 2.6.1 - UNRELEASED
YARN-3493. RM fails to come up with error "Failed to load/recover state"
when mem settings are changed. (Jian He via wangda)
YARN-3487. CapacityScheduler scheduler lock obtained unnecessarily when
calling getQueue (Jason Lowe via wangda)
Release 2.6.0 - 2014-11-18
INCOMPATIBLE CHANGES

View File

@ -604,7 +604,7 @@ public class CapacityScheduler extends
return queue;
}
public synchronized CSQueue getQueue(String queueName) {
public CSQueue getQueue(String queueName) {
if (queueName == null) {
return null;
}
@ -902,11 +902,7 @@ public class CapacityScheduler extends
boolean includeChildQueues, boolean recursive)
throws IOException {
CSQueue queue = null;
synchronized (this) {
queue = this.queues.get(queueName);
}
queue = this.queues.get(queueName);
if (queue == null) {
throw new IOException("Unknown queue: " + queueName);
}