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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to