Sanil15 commented on a change in pull request #1219: SAMZA-2373: Container 
Placement Service (core functionality) for container move and restart
URL: https://github.com/apache/samza/pull/1219#discussion_r352921308
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerManager.java
 ##########
 @@ -132,9 +201,27 @@ void handleContainerLaunchFail(String processorId, String 
containerId, String pr
   }
 
   /**
-   * Handles an expired resource request for both active and standby 
containers. Since a preferred host cannot be obtained
-   * this method checks the availability of surplus ANY_HOST resources and 
launches the container if available. Otherwise
-   * issues an ANY_HOST request. Only applies to HOST_AFFINITY enabled cases
+   * Handles the state update on successful launch of a container, if this 
launch is due to a container placement action updates the
+   * related metadata to report success
+   *
+   * @param processorId logical processor id of container 0,1,2
+   */
+  void handleContainerLaunchSuccess(String processorId) {
+    if (hasActiveContainerPlacementAction(processorId)) {
+      ContainerPlacementMetadata metadata = 
getPlacementActionMetadata(processorId).get();
+      metadata.setActionStatus(ContainerPlacementMessage.StatusCode.SUCCEEDED,
+              "Successfully completed the container placement action");
+      LOG.info("Marking the container placement action success {}", metadata);
+    }
+  }
 
 Review comment:
   Once https://github.com/apache/samza/pull/1227 is merged, this method will 
create a response message & invoke 
`ContainerPlacementHandler#writeContainerPlacementResponseMessage`

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to