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") @SuppressWarnings("unchecked")
public void containerLaunchedOnNode(ContainerId containerId, public void containerLaunchedOnNode(ContainerId containerId,
NodeId nodeId) { NodeId nodeId) {
writeLock.lock(); readLock.lock();
try { try {
// Inform the container // Inform the container
RMContainer rmContainer = getRMContainer(containerId); RMContainer rmContainer = getRMContainer(containerId);
@ -670,7 +670,7 @@ public void containerLaunchedOnNode(ContainerId containerId,
rmContainer.handle( rmContainer.handle(
new RMContainerEvent(containerId, RMContainerEventType.LAUNCHED)); new RMContainerEvent(containerId, RMContainerEventType.LAUNCHED));
} finally { } finally {
writeLock.unlock(); readLock.unlock();
} }
} }