public ListenableFuture<ContainerReleaseResponse> releaseContainer(Container container) {
LOG.info("Requesting container RELEASE:" + container);
SettableFuture<ContainerReleaseResponse> future = SettableFuture.create();
synchronized (allocatedContainerSet) {
if (!allocatedContainerSet.contains(container.getId())) {
future.set(new ContainerReleaseResponse());
} else {
containerReleaseMap.put(container.getId(), future);
amRMClient.releaseAssignedContainer(container.getId());
}
}