Hi, Qi,

Sorry to reply late. I am curious on your comment that the close and stop
methods are not called. When user initiated a kill request, the graceful
shutdown sequence is triggered by the shutdown hook added to
SamzaContainer. The shutdown sequence is the following in the code:
{code}
     info("Shutting down.")

      shutdownConsumers
      shutdownTask
      shutdownStores
      shutdownDiskSpaceMonitor
      shutdownHostStatisticsMonitor
      shutdownProducers
      shutdownLocalityManager
      shutdownOffsetManager
      shutdownMetrics
      shutdownSecurityManger

      info("Shutdown complete.")
{code}

in which, MessageChooser.stop() is invoked in shutdownConsumers, and
SystemProducer.close() is invoked in shutdownProducers.

Could you explain why you are not able to shutdown a Samza job gracefully?

Thanks!

-Yi

On Mon, Dec 12, 2016 at 6:33 PM, 舒琦 <sh...@eefung.com> wrote:

> Hi Guys,
>
>         How can I stop running samza job gracefully except killing it?
>
>         Because when samza job was killed, the close and stop method in
> BaseMessageChooser and SystemProducer will not be called and the container
> log will be removed automatically, how can resolve this?
>
>         Thanks.
>
> ————————
> ShuQi

Reply via email to