Signal Trigger

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Signal Trigger

nragon
This post was updated on .
Hi,

My use case is the following:
Every time an event is processed with a signal event the window must be fired after the allowed lateness. If no signal event arrives the window must close after the gap, like in session window.
I’m registering a timer for signal + allowed lateness.
Hope you can tell me if you think this is a good idea :)
EventTimeSessionSignalTrigger.java
SignalReduceFunction.java

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Signal Trigger

Aljoscha Krettek
Hi,
this looks almost correct. In your written description you say that the Trigger should fire after the allowed lateness if a signal event was received. In your code, however, you fire at the timestamp of the signal event.

Best,
Aljoscha

> On 3. Apr 2017, at 18:45, nragon <[hidden email]> wrote:
>
> Hi Stephan,
>
> My use case is the following:
> Every time an event is processed with a signal event the window must be
> fired after the allowed lateness. If no signal event arrives the window must
> close after the gap, like in session window.
> I’m registering a timer for signal + allowed lateness.
> Hope you can tell me if you think this is a good idea :)
> EventTimeSessionSignalTrigger.java
> <http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/file/n12509/EventTimeSessionSignalTrigger.java>  
> SignalReduceFunction.java
> <http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/file/n12509/SignalReduceFunction.java>  
>
> Thanks,
> Nuno
>
>
>
>
> --
> View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Signal-Trigger-tp12509.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Signal Trigger

nragon
Hi,

I believe this "timestamp + this.delay" is the signal event timestamp + the allowed lateness which in this case an configuring it as EventTimeSessionSignalTrigger.of(this.lateness.toMilliseconds());
So, if the allowed lateness is 10 seconds and the event arrived at 15:10 the event timer would be called at 15:20 right? It should be the desired behaviour.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Signal Trigger

Aljoscha Krettek
Ah sorry, you’re right. You add the delay to the signal timestamp.

> On 4. Apr 2017, at 19:25, nragon <[hidden email]> wrote:
>
> Hi,
>
> I believe this "timestamp + this.delay" is the signal event timestamp + the
> allowed lateness which in this case an configuring it as
> EventTimeSessionSignalTrigger.of(this.lateness.toMilliseconds());
> So, if the allowed lateness is 10 seconds and the event arrived at 15:10 the
> event timer would be called at 15:20 right? It should be the desired
> behaviour.
>
> Thanks
>
>
>
> --
> View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Signal-Trigger-tp12509p12521.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.