Sanil15 commented on a change in pull request #1347: SAMZA-2511 : Adding logic 
to handle container stop fail 
URL: https://github.com/apache/samza/pull/1347#discussion_r408579584
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerManager.java
 ##########
 @@ -233,6 +233,30 @@ void handleContainerLaunchFail(String processorId, String 
containerId, String pr
     }
   }
 
+  /**
+   * Handle the container stop failure for active containers and standby (if 
enabled).
+   * @param processorId logical id of the container eg 1,2,3
+   * @param containerId last known id of the container deployed
+   * @param containerHost host on which container is requested to be deployed
+   * @param containerAllocator allocator for requesting resources
+   */
+  void handleContainerStopFail(String processorId, String containerId, String 
containerHost,
+      ContainerAllocator containerAllocator) {
+    if (processorId != null && hasActiveContainerPlacementAction(processorId)) 
{
+      // Assuming resource acquired on destination host will be relinquished 
by the containerAllocator,
+      // we mark the placement action as failed, and return.
 
 Review comment:
   In the case of ContainerPlacement actions, request in the allocator is 
waiting for active container to stop and since the active container stop fails 
here, you also want to cancel the resource request tied to the placement action
   
   resourceRequestState.cancelResourceRequest(request);
   
   I believe ContainerPlacementMetadata maintains a set the resource-request 
that we can read, but only need to cancel the latest one from that set (since 
that is the one that is active)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to