Re: Flink window triggering and timing on connected streams

2019-02-26 Thread Rong Rong
Hi Andrew, To add to the answer Till and Hequn already provide. WindowOperator are operating on a per-key-group based. so as long as you only have one open session per partition key group, you should be able to manage the windowing using the watermark strategy Hequn mentioned. As Till mentioned, t

Re: Flink window triggering and timing on connected streams

2019-02-26 Thread Till Rohrmann
Hi Andrew, if using connected streams (e.g. CoFlatMapFunction or CoMapFunction), then the watermarks will be synchronized across both inputs. Concretely, you will always emit the minimum of the watermarks arriving on input channel 1 and 2. Take a look at AbstractStreamOperator.java:773-804. Cheer

Re: Flink window triggering and timing on connected streams

2019-02-25 Thread Andrew Roberts
I’m not sure that approach will work for me, as I have many sessions going at the same time which can overlap. Also, I need to be able to have sessions time out if they never receive an end event. Do you know directly if setting a timer triggers when any timestamp passes that time, or when the w

Re: Flink window triggering and timing on connected streams

2019-02-25 Thread Hequn Cheng
Hi Andrew, > I have an “end session” event that I want to cause the window to fire and purge. Do you want to fire the window only by the 'end session' event? I see one option to solve the problem. You can use a tumbling window(say 5s) and set your timestamp to t‘+5s each time receiving an 'end se

Flink window triggering and timing on connected streams

2019-02-25 Thread Andrew Roberts
Hello, I’m trying to implement session windows over a set of connected streams (event time), with some custom triggering behavior. Essentially, I allow very long session gaps, but I have an “end session” event that I want to cause the window to fire and purge. I’m assigning timestamps and water