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 CEP timeout occurs even for a successful match when using followedBy
Date Sat, 29 Apr 2017 10:14:23 GMT
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