You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@twill.apache.org by "...the end" <54...@qq.com> on 2016/10/19 09:49:36 UTC

some questions about twill runnable lifecycle

hi there,


I have a little question about runnable's lifecycle.


In my mind, the runnable's lifecycle looks like this: init -> run -> destroy, if stop method invokes, it will influence the run state. 


If I invoke the terminate method of TwillController, it will enter the doShutDown method of YarnTwillController. I've seen that there is a time control for stop time, like this:

Does it mean that, after the stop method of Runnable invoked, it only allows Runnable to do stop process up to 60 seconds?If Runnable cannot stop in 60 seconds, controller will kill this app by force? How to adjust this stop time limit?


Hoping for your voice.
Thanks!


Haosu Guo

Re: some questions about twill runnable lifecycle

Posted by Terence Yim <ch...@gmail.com>.
Hi,

You are correct about the stop timeout. Currently that 60 seconds timeout is not configurable. It can be an enhancement to the terminate method that can takes a timeout value instead of using the default 60 seconds. Would you mind opening a JIRA for that?

Thanks,
Terence

Sent from my iPhone

> On Oct 19, 2016, at 2:49 AM, ...the end <54...@qq.com> wrote:
> 
> hi there,
> 
> I have a little question about runnable's lifecycle.
> 
> In my mind, the runnable's lifecycle looks like this: init -> run -> destroy, if stop method invokes, it will influence the run state. 
> 
> If I invoke the terminate method of TwillController, it will enter the doShutDown method of YarnTwillController. I've seen that there is a time control for stop time, like this:
> 
> Does it mean that, after the stop method of Runnable invoked, it only allows Runnable to do stop process up to 60 seconds?If Runnable cannot stop in 60 seconds, controller will kill this app by force? How to adjust this stop time limit?
> 
> Hoping for your voice.
> Thanks!
> 
> Haosu Guo