Re: Apache Flink - How to destroy global window and release it's resources

2019-05-07 Thread Aljoscha Krettek
Hi, There should be no window or trigger object kept per window. Aljoscha > On 15. Apr 2019, at 10:22, Fabian Hueske wrote: > > Hi, > > Aljoscha know the implementation best (since he implemented it). > > From my understanding (Aljoscha please correct me if I'm wrong), all Flink > managed

Re: Apache Flink - How to destroy global window and release it's resources

2019-04-15 Thread Fabian Hueske
Hi, Aljoscha know the implementation best (since he implemented it). >From my understanding (Aljoscha please correct me if I'm wrong), all Flink managed state is removed (given that user-defined state is correctly cleaned up). However, for each key, a window and a trigger object might be kept (th

Re: Apache Flink - How to destroy global window and release it's resources

2019-04-12 Thread M Singh
Hi Fabian/Guowei:  Thanks for your pointers.   Fabian, as you pointed out, global window is never completely removed since it's end time is Long.MAX_VALUE, and that is my concern.  So, is there any other way of clean up the now purged global windows ? Thanks again. On Thursday, April

Re: Apache Flink - How to destroy global window and release it's resources

2019-04-11 Thread Aljoscha Krettek
For a GlobalWindow, returning TriggerResult.PURGE (or FIRE_AND_PURGE) and removing all trigger state (meaning timers and state) will get rid of all state. There is no state for the GlobalWindow itself, it only semantically exists because of the elements in it and the Trigger state. Aljoscha >

Re: Apache Flink - How to destroy global window and release it's resources

2019-04-11 Thread Fabian Hueske
Hi, As far as I know, a window is only completely removed when time (event or processing time, depending on the window type) passes the window's end timestamp. Since, GlobalWindow's end timestamp is Long.MAX_VALUE, it is never completely removed. I'm not 100% sure what state is kept around. It mig

Re: Apache Flink - How to destroy global window and release it's resources

2019-04-10 Thread Guowei Ma
Hi, I think you could return a proper TriggerResult, which defines how to deal with the window elements after computing a window in your trigger implementation. You could find the detail information from the doc[1]. 1. https://ci.apache.org/projects/flink/flink-docs-release-1.8/dev/stream/operator