You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by ant burton <ap...@gmail.com> on 2017/10/02 14:42:51 UTC

Session Window set max timeout

Is it possible to limit session windowing to a max of n seconds/hours etc?

i.e. I would like a session window, but if a session runs for an
unacceptable amount of time, I would like to close it.

Thanks,

Re: Session Window set max timeout

Posted by Timo Walther <tw...@apache.org>.
Hi,

I would recommend to implement your custom trigger in this case. You can 
override the default trigger of your window:

https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/stream/operators/windows.html#triggers

This is the interface where you can control the triggering:
https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/triggers/Trigger.java

I hope this helps.

Regards,
Timo


Am 10/2/17 um 4:42 PM schrieb ant burton:
> Is it possible to limit session windowing to a max of n seconds/hours etc?
>
> i.e. I would like a session window, but if a session runs for an 
> unacceptable amount of time, I would like to close it.
>
> Thanks,