@Override
  public void onResourcesAvailable(List<SamzaResource> resources) {
    for (SamzaResource resource : resources) {
      onResourceAllocated(resource);
    }
  }
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