/** * Release an allocated container on this node. * * @param container container to be released */ public synchronized void releaseContainer(Container container) { if (!isValidContainer(container.getId())) { LOG.error("Invalid container released " + container); return; } /* remove the containers from the nodemanger */ if (null != launchedContainers.remove(container.getId())) { updateResource(container); } LOG.info( "Released container " + container.getId() + " of capacity " + container.getResource() + " on host " + rmNode.getNodeAddress() + ", which currently has " + numContainers + " containers, " + getUsedResource() + " used and " + getAvailableResource() + " available" + ", release resources=" + true); }