Outputting the content of in flight session windows

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Outputting the content of in flight session windows

jelmer
I defined a session window and I would like to write the contents of the window to storage before the window closes

Initially I was doing this by setting a CountTrigger.of(1) on the session window. But this leads to very frequent writes. 

To remedy this i switched to a ContinuousProcessingTimeTrigger.of(Time.minutes(1)) but this seems to not perform well, and if i understand it correctly it will fire even if no new elements have been added to the window since the last fire. 

I then proceeded to create my own trigger implementation that aims to Fire at most once every minute (processing time)

This works In simple test scenario's on my developer machine but somehow fails on production.

So I have two questions. 

1. What would be the best way to periodically output content of a session window
2. Can anyone come up with a plausible reason why my custom trigger never fires ?