diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java index c50ee56738b..2c84d399242 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java @@ -656,7 +656,7 @@ public class SchedulerApplicationAttempt implements SchedulableEntity { @SuppressWarnings("unchecked") public void containerLaunchedOnNode(ContainerId containerId, NodeId nodeId) { - writeLock.lock(); + readLock.lock(); try { // Inform the container RMContainer rmContainer = getRMContainer(containerId); @@ -670,7 +670,7 @@ public class SchedulerApplicationAttempt implements SchedulableEntity { rmContainer.handle( new RMContainerEvent(containerId, RMContainerEventType.LAUNCHED)); } finally { - writeLock.unlock(); + readLock.unlock(); } }