YARN-3487. CapacityScheduler scheduler lock obtained unnecessarily when calling getQueue (Jason Lowe via wangda)
This commit is contained in:
parent
f65eeb412d
commit
f47a5763ac
|
@ -238,6 +238,8 @@ Release 2.7.1 - UNRELEASED
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
YARN-3487. CapacityScheduler scheduler lock obtained unnecessarily when
|
||||||
|
calling getQueue (Jason Lowe via wangda)
|
||||||
|
|
||||||
Release 2.7.0 - UNRELEASED
|
Release 2.7.0 - UNRELEASED
|
||||||
|
|
||||||
|
|
|
@ -642,7 +642,7 @@ public class CapacityScheduler extends
|
||||||
return queue;
|
return queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized CSQueue getQueue(String queueName) {
|
public CSQueue getQueue(String queueName) {
|
||||||
if (queueName == null) {
|
if (queueName == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -940,11 +940,7 @@ public class CapacityScheduler extends
|
||||||
boolean includeChildQueues, boolean recursive)
|
boolean includeChildQueues, boolean recursive)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
CSQueue queue = null;
|
CSQueue queue = null;
|
||||||
|
|
||||||
synchronized (this) {
|
|
||||||
queue = this.queues.get(queueName);
|
queue = this.queues.get(queueName);
|
||||||
}
|
|
||||||
|
|
||||||
if (queue == null) {
|
if (queue == null) {
|
||||||
throw new IOException("Unknown queue: " + queueName);
|
throw new IOException("Unknown queue: " + queueName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue