Sanil15 commented on a change in pull request #1414:
URL: https://github.com/apache/samza/pull/1414#discussion_r474334828



##########
File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerManager.java
##########
@@ -391,6 +402,28 @@ public void 
registerContainerPlacementAction(ContainerPlacementRequestMessage re
       return;
     }
 
+    /*
+     * When destination host is {@code FORCE_RESTART_LAST_SEEN} its treated as 
eqvivalent to kill -9 operation for the container
+     * In this scenario container is stopped first and we fallback to normal 
restart path
+     */
+    if (destinationHost.equals(FORCE_RESTART_LAST_SEEN)) {
+      LOG.info("Issuing a force restart for Processor ID: {} for 
ContainerPlacement action request {}", processorId, requestMessage);
+      
clusterResourceManager.stopStreamProcessor(samzaApplicationState.runningProcessors.get(processorId));
+      writeContainerPlacementResponseMessage(requestMessage, 
ContainerPlacementMessage.StatusCode.SUCCEEDED,
+          "Successfully issued a stop container request falling back to normal 
restart path");
+      return;
+    }
+
+    /**
+     * When destination host is {@code LAST_SEEN} its treated as a restart 
request on the host where container is running
+     * on or has been seen last
+     */

Review comment:
       sure




----------------------------------------------------------------
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]


Reply via email to