dnishimura commented on a change in pull request #1213: [WIP] SAMZA-2305: 
Stream processor should ensure previous container is stopped during a rebalance
URL: https://github.com/apache/samza/pull/1213#discussion_r343775206
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/processor/StreamProcessor.java
 ##########
 @@ -461,8 +483,25 @@ public void onJobModelExpired() {
             } else {
               LOGGER.info("Container: {} shutdown completed for stream 
processor: {}.", container, processorId);
             }
+          } else if (state == State.IN_REBALANCE) {
+            if (container != null) {
+              boolean hasContainerShutdown = interruptSamzaContainer();
 
 Review comment:
   It appears that upon a successful interrupt on a SamzaContainer, it is 
required to create a new `containerExecutorService`. Since the lifecycle of the 
`containerExecutorService` is dependent on the result of 
`interruptSamzaContainer()` it might be better to pass in the 
`containerExecutorService` as a parameter to the method to make that more 
obvious to the caller in case this method needs to be used elsewhere in the 
future.

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