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
<https://gist.github.com/jelmerk/9a97417fa9d7f8960b2c4b319fe62dad> 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 ?

Reply via email to