YARN-3010. Fixed findbugs warning in AbstractYarnScheduler. Contributed by Yi Liu

This commit is contained in:
Jian He 2015-01-07 14:12:07 -08:00
parent 3ed0aed3cc
commit e13a484a2b
4 changed files with 8 additions and 4 deletions

View File

@ -328,6 +328,9 @@ Release 2.7.0 - UNRELEASED
YARN-2230. Fixed few configs description in yarn-default.xml. (Vijay Bhat YARN-2230. Fixed few configs description in yarn-default.xml. (Vijay Bhat
via jianhe) via jianhe)
YARN-3010. Fixed findbugs warning in AbstractYarnScheduler. (Yi Liu via
jianhe)
Release 2.6.0 - 2014-11-18 Release 2.6.0 - 2014-11-18
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -189,8 +189,8 @@ public abstract class AbstractYarnScheduler
} }
} }
protected void containerLaunchedOnNode(ContainerId containerId, protected synchronized void containerLaunchedOnNode(
SchedulerNode node) { ContainerId containerId, SchedulerNode node) {
// Get the application for the finished container // Get the application for the finished container
SchedulerApplicationAttempt application = getCurrentAttemptForContainer SchedulerApplicationAttempt application = getCurrentAttemptForContainer
(containerId); (containerId);

View File

@ -249,7 +249,8 @@ public class CapacityScheduler extends
} }
@Override @Override
public RMContainerTokenSecretManager getContainerTokenSecretManager() { public synchronized RMContainerTokenSecretManager
getContainerTokenSecretManager() {
return this.rmContext.getContainerTokenSecretManager(); return this.rmContext.getContainerTokenSecretManager();
} }

View File

@ -1232,7 +1232,7 @@ public class FairScheduler extends
} }
} }
private String resolveReservationQueueName(String queueName, private synchronized String resolveReservationQueueName(String queueName,
ApplicationId applicationId, ReservationId reservationID) { ApplicationId applicationId, ReservationId reservationID) {
FSQueue queue = queueMgr.getQueue(queueName); FSQueue queue = queueMgr.getQueue(queueName);
if ((queue == null) || !allocConf.isReservable(queue.getQueueName())) { if ((queue == null) || !allocConf.isReservable(queue.getQueueName())) {