Hi Nirmalya, please don't feel discouraged to write blog posts! There are many things you could write about Flink's support for windows, e.g., you could discuss use cases / applications that require advanced window semantics.
Regarding my comment on how/when elements are removed from a window: Elements are only removed if the Trigger returns a PURGE (or FIRE_AND_PURGE) TriggerResult, i.e., the runtime will not remove elements unless the trigger tells it to purge. If you look at the implementation of the CountTrigger, you'll see that it only returns CONTINUE and FIRE. Hence, elements are *never* removed from the window. This is actually, quite dangerous and will eventually lead to an OutOfMemoryError because the window data will be kept forever in memory. Best, Fabian 2015-11-30 18:59 GMT+01:00 Nirmalya Sengupta <sengupta.nirma...@gmail.com>: > Hello Fabian, > > Thanks for going through my long mail and concise responses. I am just > happy that I was not way off the mark in my understanding. > > It seems to me that I would rather wait for your blog before asking more > questions. Not sure, if I will left with enough drive to write my (planned) > blogs, once yours is out. :-) > > Yes, your solution works and as luck would have it, I figured out the same > during the weekend, after going through your earlier responses. Thanks. > > One question though: > > You mentioned - ' It depends on the TriggerResult, what happens with the > four elements after the user function was invoked. A CountTrigger keeps the > elements in the window. ' > > Could you elaborate this point a bit? If CountTrigger _keeps_ the elements > in the window, who _removes_ them? Are the elements removed by the > Trigger's FIRE_AND_PURGE directive *or* by Flink runtime, when the > current pane is destroyed by the runtime before a new pane is created? > > -- Nirmalya > > > - > Software Technologist > http://www.linkedin.com/in/nirmalyasengupta > "If you have built castles in the air, your work need not be lost. That is > where they should be. > Now put the foundation under them." >