rmatharu commented on a change in pull request #1281: SAMZA-2378: Container 
Placements support for Standby containers enabled jobs
URL: https://github.com/apache/samza/pull/1281#discussion_r382395219
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerManager.java
 ##########
 @@ -136,7 +135,22 @@ boolean handleContainerLaunch(SamzaResourceRequest 
request, String preferredHost
         LOG.info("Waiting for running container to shutdown due to existing 
ContainerPlacement action {}", actionMetaData);
         return false;
       } else if (actionStatus == 
ContainerPlacementMetadata.ContainerStatus.STOPPED) {
-        allocator.runStreamProcessor(request, preferredHost);
+        // If the job has standby containers enabled, always check standby 
constraints before issuing a start on container
 
 Review comment:
   Nit: 
   
   Can the lines above 
   
   ```
   if (hasActiveContainerPlacementAction(request.getProcessorId())) {
   
   String processorId = request.getProcessorId();             
   
   String processorId = request.getProcessorId();
   
   ContainerPlacementMetadata actionMetaData = 
getPlacementActionMetadata(processorId).get();         
   ```
   
   
   be rewritten to: 
   
   ```
   Optional<ContainerPlacementMetadata> actionMetaData = 
getPlacementActionMetadata(processorId);
   
   if (actionMetaData.isPresent()) {
   use actionMetaData.get()  everywhere after...
   ```
   
   

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