You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by nragon <nu...@wedotechnologies.com> on 2017/04/03 16:45:05 UTC

Signal Trigger

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.

Re: Signal Trigger

Posted by Aljoscha Krettek <al...@apache.org>.
Ah sorry, you’re right. You add the delay to the signal timestamp.

> On 4. Apr 2017, at 19:25, nragon <nu...@wedotechnologies.com> 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.


Re: Signal Trigger

Posted by nragon <nu...@wedotechnologies.com>.
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.

Re: Signal Trigger

Posted by Aljoscha Krettek <al...@apache.org>.
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 <nu...@wedotechnologies.com> 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.