YARN-10459. containerLaunchedOnNode method not need to hold scheduler… (#3195)
This commit is contained in:
parent
87abc437c7
commit
ec2fd01333
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user