Re: Freeing resources in SourceFunction

2016-11-03 Thread Maximilian Michels
For your use case you should use the close() method which is always called upon shutdown of your source. The cancel() is only called when you explicitly cancel your job. -Max On Thu, Nov 3, 2016 at 2:45 PM, Yury Ruchin wrote: > Hello, > > I'm writing a custom source function for my streaming jo

Freeing resources in SourceFunction

2016-11-03 Thread Yury Ruchin
Hello, I'm writing a custom source function for my streaming job. The source function manages some connection pool. I want to close that pool once my job is "finished" (since the stream is unbounded, the only way I see is to cancel the streaming job). Since I inherit RichSourceFunction, there are