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

ASF GitHub Bot commented on FLINK-2111:
---------------------------------------

Github user mjsax commented on the pull request:

    https://github.com/apache/flink/pull/750#issuecomment-114123970
  
    I agree that extending the state graph is critical. However, IMHO it is the 
right way to go. I would rather spend more time on getting it right in the 
first place, than introducing it later on. I added a couple of tests that 
should ensure that the transitions work correctly. Furthermore, sending 
"terminate" to a source relies on a cooperative source. If the source ignores 
the signal, it should be in state TERMINATING to indicate the user that the 
signal was received. If the source ignores the signal, the user can still 
"cancel" the job. Additionally, I can imagine that a source might take a few 
seconds to stop emitting new data (eg, for checkpoint/consistency reason). For 
this case, having a separate TERMINATING state is also nice.
    
    Same about extra JobStatus. I rather spent more time and get it right from 
the beginning on.
    
    I think that sending the terminate signal to sources only is a good idea (I 
thought about it, too), as other operators ignore the signal anyway. However, I 
don't know how to distinguish sources from operators/sinks and how to send a 
signal to dedicated operators only? Furthermore, I would like to enable 
"terminate" signal for streaming jobs only (but once again, I don't know how to 
distinguish streaming and batch). Can you give some hints how to get both of 
this done?
    
    About AbstractInvocable -> using an interface is fine with me. If we sent 
the "terminate" signal to streaming sources only, it will result in a cleaner 
design.


> Add "terminate" signal to cleanly stop streaming jobs
> -----------------------------------------------------
>
>                 Key: FLINK-2111
>                 URL: https://issues.apache.org/jira/browse/FLINK-2111
>             Project: Flink
>          Issue Type: Improvement
>          Components: Distributed Runtime, JobManager, Local Runtime, 
> Streaming, TaskManager, Webfrontend
>            Reporter: Matthias J. Sax
>            Assignee: Matthias J. Sax
>            Priority: Minor
>
> Currently, streaming jobs can only be stopped using "cancel" command, what is 
> a "hard" stop with no clean shutdown.
> The new introduced "terminate" signal, will only affect streaming source 
> tasks such that the sources can stop emitting data and terminate cleanly, 
> resulting in a clean termination of the whole streaming job.
> This feature is a pre-requirment for 
> https://issues.apache.org/jira/browse/FLINK-1929



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

Reply via email to