Re: Size of a window without explicit trigger/evictor
Posted by
Fabian Hueske-2 on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Size-of-a-window-without-explicit-trigger-evictor-tp3999p4087.html
Hi Nirmalya,
sorry for the delayed answer.
First of all, Flink does not take care that our windows fit into memory.
The default trigger depends on the way in which you define a window. Given a KeyedStream you can define a window in the following ways:
KeyedStream s = ...
s.timeWindow() // this will use an EventTimeTrigger or ProcessingTimeTrigger, depending on the time characteristics of the stream
s.countWindow() // this will use a CountTrigger
s.window(? extends WindowAssigner) // this will use the default trigger as defined by the WindowAssigner
None of these triggers monitors the JVM heap to prevent OOMs. If you define a TimeTrigger for one hour and receive too much data, the program will crash. IMO, this behavior is preferable over early triggering which would cause semantically wrong results. If you use a ReduceFunction to compute the result of a window (and no Evictor), the window result can be partially aggregated and its state does not grow.
Best, Fabian