private int releaseResourcesForHost(String host) {
    int numReleasedResources = 0;
    List<SamzaResource> samzaResources = allocatedResources.get(host);
    if (samzaResources != null) {
      for (SamzaResource resource : samzaResources) {
        log.info("Releasing Container ID: {} on host: {}", resource.getContainerId(), host);
        manager.releaseResources(resource);
        numReleasedResources++;
      }
    }
    return numReleasedResources;
  }
Releases all allocated resources for the specified host.
@param host  the host for which the resources should be released.
@return      the number of resources released.
samza-core/src/main/java/org/apache/samza/clustermanager/ResourceRequestState.java