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_r351543657
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerManager.java
 ##########
 @@ -97,7 +126,13 @@ void handleContainerLaunch(SamzaResourceRequest request, 
String preferredHost, S
    */
   void handleContainerStop(String processorId, String containerId, String 
preferredHost, int exitStatus,
       Duration preferredHostRetryDelay, ContainerAllocator containerAllocator) 
{
-    if (standbyContainerManager.isPresent()) {
+    if (getControlActionMetadata(processorId).isPresent()) {
+      LOG.info("Setting the container with processorId {} stopped to be true 
because of existing container placement action", processorId);
+      Object activeContainerStopped = 
getControlActionMetadata(processorId).get().getActiveContainerStopped();
+      synchronized (activeContainerStopped) {
+        activeContainerStopped.notifyAll();
 
 Review comment:
   ContainerAllocator thread used to wait and get notified by the 
ClusterResourceManager callback thread on stop notification receiving, but we 
are gonna change to do busy looping with a sleep timeout so when later we 
parallelize container allocation, the allocation threads would not need to be 
blocked by this change. 

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