How to use "every" pattern operator in Flink CEP

Sina Nourian

In Esper CEP engine event patterns, there's Every operator which indicates that the pattern sub-expression should restart when the sub-expression qualified by the every keyword evaluates to true or false.

According to this document, We can use every operator in different ways like:

    A -> B
    every ( A -> B )
    every A -> B
    A -> every B
    every A -> every B

I would like to know which of these patterns are possible in Flink CEP? I want to use every A -> B in Flink but don't know how.

And which one of the above patterns this default CEP pattern in Flink represents? (Using Flink v1.1.4)

Pattern<Event, ?> pattern = Pattern.begin("start").where(evt -> evt.getId() == 42)
    .followedBy("end").where(evt -> evt.getName().equals("end"));

Thanks in advance.

Amarjit Dhillon

Flink provides some documentation as to how to use every which says that if you specify subtype then it will be called for every iteration

start.subtype(SubEvent.class).where(new SimpleCondition<SubEvent>() {
    @Override
    public boolean filter(SubEvent value) {
        return ... // some condition
    }
});

But in my opinion, it is not what you are looking for. However, you can have a look at a light-weight Siddhi- Flink CEP library by using which you will be able to use siddhi query language in Flink

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to stop Apache Flink CEP Pattern?

Apache Flink CEP pattern of multiple event types

Apache Flink CEP Pattern operation for NOT followedBy

Single FLINK CEP Pattern exist at a Time

Flink CEP iterative condition for single pattern in Scala

Apache Flink CEP pattern detection with java [ apache-flink ]

How to use declaration pattern of "is" operator with ternary operator?

FLINK CEP (Java 8) - persistent "identity" through matching pattern

How to use NOT operator (^) in regular expression pattern of XSLT?

Flink CEP state store

CEP in apache beam with flink

Creating CEP with Apache Flink

how to add new event to flink CEP data stream?

How to create batch or slide windows using Flink CEP?

How to write Junit test code for Flink CEP with Kafka consumer

Flink CEP Pattern does not match for first events after starting job and always matches previous events set

Is it possible to group the events based on certain parameter and running Flink CEP pattern in each group?

How to use sed to replace every occurrence of a pattern minus one case?

How do I use the regular pattern operator {m,n} in grep?

Sequence matching semantics in Flink CEP

Flink CEP not detecting last Record

How to use Flink Metrics

How to use multiset in flink?

How to handle exception properly in flink operator?

Flink SQL - How to parse a TIMESTAMP with custom pattern?

How can I use VFS transport in WSO CEP 3.0?

Flink CEP PojoSerializer wrong polymorphism resolution

Measuring event-time latency with Flink CEP

Is it possible to process multiple streams in apache flink CEP?