System.exit() vs throwing exception from the pipeline

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

System.exit() vs throwing exception from the pipeline

Gordon Weakliem
What's the general advice on calling System.exit() inside an operator, vs throwing an exception and having the execution environment tear down the pipeline. Throwing the exception seems cleaner but it does appear that Flink might do an orderly shutdown with System.exit(). Will the close() methods be called, file handles closed etc?

--
Img
  Gordon Weakliem|  Sr. Software Engineer
  303.493.5490  
  Boulder | NYC London        



CONFIDENTIALITY. This communication is intended only for the use of the intended recipient(s) and contains information that is privileged and confidential. As a recipient of this confidential and proprietary information, you are prohibited from distributing this information outside of sovrn. Further, if you are not the intended recipient, please note that any dissemination of this communication is prohibited. If you have received this communication in error, please erase all copies of the message, including all attachments, and please also notify the sender immediately. Thank you for your cooperation.
Reply | Threaded
Open this post in threaded view
|

Re: System.exit() vs throwing exception from the pipeline

Hung
As I understood if wanted a smooth shutdown, it's recommend to throw
exception, and then cancel() is called, where you can even write your own.
Don't think it's the same as System.exit()

Cheers,

Sendoh



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/