public void handleExpiredResourceRequest(String containerID, SamzaResourceRequest request,
      Optional<SamzaResource> alternativeResource, ContainerAllocator containerAllocator,
      ResourceRequestState resourceRequestState) {

    if (StandbyTaskUtil.isStandbyContainer(containerID)) {
      handleExpiredRequestForStandbyContainer(containerID, request, alternativeResource, containerAllocator,
          resourceRequestState);
    } else {
      handleExpiredRequestForActiveContainer(containerID, request, containerAllocator, resourceRequestState);
    }
  }
Handle an expired resource request
@param containerID the containerID for which the resource request was made
@param request the expired resource request
@param alternativeResource an alternative, already-allocated, resource (if available)
@param containerAllocator the container allocator (used to issue any required subsequent resource requests)
@param resourceRequestState used to cancel resource requests if required.
samza-core/src/main/java/org/apache/samza/clustermanager/StandbyContainerManager.java