YARN-10459. containerLaunchedOnNode method not need to hold scheduler… (#3195)

This commit is contained in:
minni31 2022-02-01 23:07:40 +05:30 committed by GitHub
parent 87abc437c7
commit ec2fd01333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -656,7 +656,7 @@ public int getNumReservedContainers(
@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 void containerLaunchedOnNode(ContainerId containerId,
rmContainer.handle(
new RMContainerEvent(containerId, RMContainerEventType.LAUNCHED));
} finally {
writeLock.unlock();
readLock.unlock();
}
}