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_r352791975
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerAllocator.java
 ##########
 @@ -195,31 +190,31 @@ void assignResourceRequests() {
       LOG.info("Handling assignment request for Processor ID: {} on host: 
{}.", processorId, preferredHost);
       if (hasAllocatedResource(preferredHost)) {
 
-        // Found allocated container on preferredHost
-        LOG.info("Found an available container for Processor ID: {} on the 
host: {}", processorId, preferredHost);
-
         // Needs to be only updated when host affinity is enabled
         if (hostAffinityEnabled) {
           state.matchedResourceRequests.incrementAndGet();
         }
 
-        containerManager.handleContainerLaunch(request, preferredHost, 
peekAllocatedResource(preferredHost), resourceRequestState, this);
+        boolean waitForNextAction =
+            containerManager.handleContainerLaunch(request, preferredHost, 
peekAllocatedResource(preferredHost),
+                resourceRequestState, this);
+
+        if (waitForNextAction) {
+          break;
 
 Review comment:
   Added this: 
   
    /**
            * Some Container launch requests are due to Container Placement 
actions like move, restarts. Under those
            * circumstances a container launch needs to wait for the previous 
container incarnation to stop. When container
            * launch is in progress the allocator thread needs to sleep and 
check again
            */

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