Isn't the upcoming CEP negation (absence of an event) feature solve this issue?
See this discussion 
thread:http://mail-archives.apache.org/mod_mbox/flink-user/201609.mbox/%3CCAC27z%3DOD%2BTq8twBw_1YKni5sWAU3g1S9WDpJw0DUwgiG9YX9Fg%40mail.gmail.com%3E

 //  Atul

      From: Till Rohrmann <trohrm...@apache.org>
 To: user@flink.apache.org 
 Sent: Friday, October 7, 2016 12:58 AM
 Subject: Re: Listening to timed-out patterns in Flink CEP
   
Hi David,
in case of event time, the timeout will be detected when the first watermark 
exceeding the timeout value is received. Thus, it depends a little bit how you 
generate watermarks (e.g. periodically, watermark per event).
In case of processing time, the time is only updated whenever a new element 
arrives. Thus, if you have an element arriving 4 seconds after Event A, it 
should detect the timeout. If the next event arrives 20 seconds later, than you 
won't see the timeout until then.
In the case of processing time, we could think about registering timeout timers 
for processing time. However, I would highly recommend you to use event time, 
because with processing time, Flink cannot guarantee meaningful computations, 
because the events might arrive out of order.
Cheers,Till
On Thu, Oct 6, 2016 at 3:08 PM, David Koch <ogd...@googlemail.com> wrote:

Hello,
With Flink CEP, is there a way to actively listen to pattern matches that time 
out? I am under the impression that this is not possible.

In my case I partition a stream containing user web navigation by "userId" to 
look for sequences of Event A, followed by B within 4 seconds for each user.
I registered a PatternTimeoutFunction which assuming a non-match only fires 
upon the first event after the specified timeout. For example, given user X: 
Event A, 20 seconds later Event B (or any other type of event).
I'd rather have a notification fire directly upon the 4 second interval 
expiring since passive invalidation is not really applicable in my case.
How, if at all can this be achieved with Flink CEP?
Thanks,
David




   

Reply via email to