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