synchronized (_genericApplicationMaster.allocatedContainerSet) {
_genericApplicationMaster.allocatedContainerSet.remove(containerStatus.getContainerId());
SettableFuture<ContainerStopResponse> stopResponseFuture =
_genericApplicationMaster.containerStopMap.remove(containerStatus.getContainerId());
if (stopResponseFuture != null) {
ContainerStopResponse value = new ContainerStopResponse();
stopResponseFuture.set(value);
} else {
SettableFuture<ContainerReleaseResponse> releaseResponseFuture =
_genericApplicationMaster.containerReleaseMap
.remove(containerStatus.getContainerId());