hi,

I've opened a JIRA for this, link: 
https://issues.apache.org/jira/browse/TWILL-196


Haosu Guo




------------------ ???????? ------------------
??????: "Terence Yim";<cht...@gmail.com>;
????????: 2016??10??20??(??????) ????0:49
??????: "...the end"<549198...@qq.com>; "dev"<dev@twill.apache.org>; 

????: Re: some questions about twill runnable lifecycle



Hi,

Technically it is possible, however it cannot be done through the 
TwillController.sendCommand() method. This is because the "stop" command is 
sent as "system" message type, while command sent through the 
TwillController.sendCommand() method is of "user" message type. The AM only 
react to the "system" "stop" command.


Terence


On Wed, Oct 19, 2016 at 9:12 AM, ...the end <549198...@qq.com> wrote:
hi??Terence

Thank you for your response. I'll open a JIRA for that. By the way, if I want 
more stop time for app, I could send a customed stop message so that I can get 
the time as long as I want to stop. Right?

Haosu Guo

---Original---
From: "Terence Yim"<cht...@gmail.com>
Date: 2016/10/19 23:15:32
To: "549198857"<549198...@qq.com>;"dev"<dev@twill.apache.org>;
Subject: Re: some questions about twill runnable lifecycle



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 <549198...@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

Reply via email to