I am interesting in writing a custom tumbling window assigner to do the
following:

As soon as the first event for that keyed stream comes in, create a window
from that point going forward N milli seconds.  Is it possible to do that
using flink?  What I want to do is get all events that occurred in a 5
minute period, where the period starts with the time of the first event.
Flink's current tumbling time windows would be locked to the top of 0, 5,
10, 15 minutes, which doesn't work well for me if the first event for a key
comes in at 14 minutes, because the window will be triggered at 15 minutes,
instead of at 19 minutes.

Looking at the interface for WindowAssigner it doesn't look like I have
enough information to do what I need.

I would need to know the key, since each keyed stream could have a
different start time, and I would need to be able to store some state about
what the start time is for each key, like a Map of
StreamKey->FirstEventTime.

Do you have any suggestions for assigning a window that starts with the
time of the first event in that keyed stream, and ends N minutes after that?

Thanks!

Dan

Reply via email to