You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Zach Cox (JIRA)" <ji...@apache.org> on 2015/02/06 22:09:35 UTC

[jira] [Commented] (SAMZA-506) Shutdown container on SIGTERM

    [ https://issues.apache.org/jira/browse/SAMZA-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14309923#comment-14309923 ] 

Zach Cox commented on SAMZA-506:
--------------------------------

We are currently using something like this to get clean Samza container shutdown in 0.8.0:

https://gist.github.com/zcox/eb3d578a83cdbe636d13

It uses Java reflection and implementation details of Samza internals, but it gets the job done.

> Shutdown container on SIGTERM
> -----------------------------
>
>                 Key: SAMZA-506
>                 URL: https://issues.apache.org/jira/browse/SAMZA-506
>             Project: Samza
>          Issue Type: New Feature
>          Components: container
>    Affects Versions: 0.8.0
>            Reporter: Zach Cox
>             Fix For: 0.9.0
>
>
> Many runtime platforms (e.g. Mesos) will issue a SIGTERM to stop the Samza container process. In this case it would be good to try to cleanly shutdown the container, so that messages stop being processed, offsets and changelogs are committed, etc. This can be accomplished using TaskCoordinator.shutdown, but there currently is no glue between that and a SIGTERM or jvm shutdown hook.
> Here is the relevant mailing list thread: http://www.mail-archive.com/dev%40samza.incubator.apache.org/msg02246.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)