flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moiz S Jinia <moiz.ji...@gmail.com>
Subject Re: CEP timeout occurs even for a successful match when using followedBy
Date Sat, 29 Apr 2017 16:23:10 GMT
Oh ok thats a bit far off. Is there any chance of a backport of
https://issues.apache.org/jira/browse/FLINK-6208 to the 1.2 branch? I
require the SKIP_TILL_NEXT behaviour for a production use case that we want
to use Flink for.

Moiz

On Sat, Apr 29, 2017 at 9:49 PM, Kostas Kloudas <k.kloudas@data-artisans.com
> wrote:

> The 1.3 is scheduled for the beginning of June.
>
> Cheers,
> Kostas
>
> On Apr 29, 2017, at 6:16 PM, Moiz S Jinia <moiz.jinia@gmail.com> wrote:
>
> Thanks Dawid!
> Yes thats what i was expecting. I'll give it a try.
>
> When do you expect 1.3.0 stable to be out?
>
> Moiz
>
> On Sat, Apr 29, 2017 at 9:20 PM, Dawid Wysakowicz <
> wysakowicz.dawid@gmail.com> wrote:
>
>> Hi,
>>
>> This is an expected behaviour. After the "ar" event there still may occur
>> other "ar" event that will also trigger a match.
>> To be more generic in all versions prior to 1.3.0 there are two different
>> consuming strategies:
>>
>>    - STRICT (the next operator) - that accepts only if the event occurs
>>    directly after the previous
>>    - SKIP TILL ANY (the followedBy operator) - it accepts any matching
>>    event following event if there were already an event that matched this
>>    pattern
>>
>> Because after "ni" event we could match with some other "ar" events, the
>> match is timeouted after 5 seconds.
>>
>> In FLINK-6208 <https://issues.apache.org/jira/browse/FLINK-6208> we
>> introduced third consuming strategy:
>>
>>    - SKIP TILL NEXT(this is the strategy for followedBy right now) - the
>>    event does not have to occur directly after the previous one but only one
>>    event can be matched
>>
>> and you can still use SKIP TILL ANY by using followedByAny. I believe the
>> SKIP TILL NEXT strategy is the one you expected.
>> You can check it on master branch. We did introduce lots of new features
>> and bugfixes to CEP for 1.3.0 version so any comments,
>> tests or suggestions are welcome.
>>
>>
>> Z pozdrowieniami! / Cheers!
>>
>> Dawid Wysakowicz
>> *Data/Software Engineer*
>> Skype: dawid_wys | Twitter: @OneMoreCoder
>> <http://getindata.com/>
>>
>> 2017-04-29 12:14 GMT+02:00 Moiz S Jinia <moiz.jinia@gmail.com>:
>>
>>> When using "next", this pattern works fine for the both a match as well
>>> as a timeout:
>>>
>>> Pattern<Event, Event> pattern = Pattern.<Event>begin("start")
>>>         .where(evt -> evt.value.equals("ni"))
>>>         .next("last").where(evt -> evt.value.equals("ar")).within
>>> (Time.seconds(5));
>>>
>>> 1. "ni" then "ar" within 5 seconds - triggers match
>>> 2. "ni" then no "ar" within 5 seconds - triggers timeout
>>>
>>> But with "followedBy", this does not behave as expected:
>>>
>>> Pattern<Event, Event> pattern = Pattern.<Event>begin("start")
>>>         .where(evt -> evt.value.equals("ni"))
>>>         .followedBy("last").where(evt -> evt.value.equals("ar")).within
>>> (Time.seconds(5));
>>>
>>> "ni" then "ar" within 5 seconds - triggers match and also triggers
>>> timeout.
>>>
>>> Why is the timeout triggered when using followedBy (when there is a
>>> match)?
>>>
>>> Version - 1.1.5.
>>>
>>
>>
>
>

Mime
View raw message