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_r343750567
 
 

 ##########
 File path: 
samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala
 ##########
 @@ -185,15 +192,19 @@ class SystemConsumers (
 
     chooser.start
 
+    started = true
+
     refresh
   }
 
   def stop {
-    debug("Stopping consumers.")
+    if (started) {
+      debug("Stopping consumers.")
 
-    consumers.values.foreach(_.stop)
+      consumers.values.foreach(_.stop)
 
-    chooser.stop
+      chooser.stop
+    }
   }
 
 Review comment:
   Should you set the `started` flag to `false` at the end of `stop`? 

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