@Override
  public void onStreamProcessorStopFailure(SamzaResource resource, Throwable t) {
    String containerId = resource.getContainerId();
    String containerHost = resource.getHost();
    String processorId = getRunningProcessor(containerId).getKey();
    LOG.warn("Stop failed for running Processor ID: {} on Container ID: {} on host: {} with exception: {}",
        processorId, containerId, containerHost, t);

    // Notify container-manager of the failed container-stop request
    containerManager.handleContainerStopFail(processorId, containerId, containerHost, containerAllocator);
  }
This methods handles the onResourceCompleted callback from the RM. Based on the ContainerExitStatus, it decides
whether the container that exited is marked as complete or failure.
@param resourceStatus status of the resource that completed
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerProcessManager.java