----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31881/#review75881 -----------------------------------------------------------
Seems like it should work. Could you write a test to verify? I know it's a little hard with shutdown hooks (or anything that interacts with System/Runtime Java stuff), but I can't actually prove to myself that this works without a test. samza-core/src/main/scala/org/apache/samza/container/RunLoop.scala <https://reviews.apache.org/r/31881/#comment123203> Nit: move outside of run. Optionally, make shutdownHook injectible via constructor for testing purposes. samza-core/src/main/scala/org/apache/samza/container/RunLoop.scala <https://reviews.apache.org/r/31881/#comment123201> I think shutdownHook needs to be made volatile. The hook will be executed from another thread than the RunLoop, which is reading the variable. - Chris Riccomini On March 10, 2015, 6:55 a.m., Ewen Cheslack-Postava wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31881/ > ----------------------------------------------------------- > > (Updated March 10, 2015, 6:55 a.m.) > > > Review request for samza. > > > Bugs: SAMZA-506 > https://issues.apache.org/jira/browse/SAMZA-506 > > > Repository: samza > > > Description > ------- > > Shutdown RunLoop on SIGTERM. > > > Diffs > ----- > > samza-core/src/main/scala/org/apache/samza/container/RunLoop.scala 499f5c6 > > Diff: https://reviews.apache.org/r/31881/diff/ > > > Testing > ------- > > Passes unit and zopkio tests. > > > Thanks, > > Ewen Cheslack-Postava > >