Questions tagged [flink-cep]

FlinkCEP - complex event processing for Apache Flink

368 questions
0
votes
2 answers

Unable to execute CEP pattern in Flink dashboard version 1.3.2 which is caused by ClassNotFoundException

I have written a simple pattern like this Pattern pattern = Pattern.begin("start") .where(new SimpleCondition() { @Override public boolean filter(JoinedEvent streamEvent) throws…
Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
0
votes
1 answer

Integrating Flink with Datadog

I am having several issues regarding Flink and Datadog integration. First, the issue is that Datadog uses dogstatsD instead of statsD which is not included in Flink documentation Another issue is that if you go to Datadog's Integrations page, Flink…
Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
0
votes
1 answer

Sequence matching semantics in Flink CEP

There is an issue in Apache JIRA: https://issues.apache.org/jira/browse/FLINK-3703. It allows defining where the matching algorithm should continue after a matching sequence has been found and there are three types of behavior: from first -…
0
votes
1 answer

unable to add counter in Flink 1.3.2

I am trying to add a counter in Flink as mentioned here, but the issue is that counter.inc() is returning void instead of Integer. Code for my Metric is given as below private static class myMetric extends RichMapFunction { …
Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
0
votes
1 answer

how to get the operation cost in Flink using cost estimator class provided in Flink

I want to do performance analysis of Flink CEP engine and I came across these classes org.apache.flink.optimizer.costs.CostEstimator; org.apache.flink.optimizer.costs.Costs; org.apache.flink.optimizer.costs.DefaultCostEstimator; But the issue is…
Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
0
votes
2 answers

accessing Flink's system metrics in code to terminal rather than using any metrics reporter like JMX

I have used JMX as a metric reporter to get the Flink metrics, but is there any way to get it as output in the terminal? I want to plot numRecordsInPerSecond for each operator for performance analysis, how can I do it? I have seen some example of…
Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
0
votes
1 answer

JunitTest DataStream of type Either with flink spector

I'm creating a test to see if the timeout of my flink pattern functions correctly. I'm using flink spector for this and I have the following testcase: @Test public void SameDoor_TwoStatuses_OneSecondTimeoutPattern() { // Arrange long now =…
Gert Kommer
  • 1,163
  • 2
  • 22
  • 49
0
votes
2 answers

error using SLF4J logger in Apache Flink

I want to output the logs in Flink, I have created the logger code as mentioned below I have imported the LoggerFactory import org.slf4j.LoggerFactory; Class CEPMonitoring contains code as follows final static org.slf4j.Logger logger =…
Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
0
votes
2 answers

Using flink-cep pattern matching without all Flink enviroment

As in the title: Is it possible to use just flink pattern matching without whole other flink enviroment?
0
votes
1 answer

Cant initialize Field on Custom DataSink (Flink CEP)

I have a problem with the Apache Flink Streaming API. I could manage to set up the whole CEP-Environment with a custom DataSource and when using a standard sink on that source like "print()", everything works fine. This is what my sink looks like…
H. Ayguen
  • 33
  • 5
0
votes
0 answers

How to stop Flink CEP engine after x number of complex events are detected and compute engine processing time

I want to find the Processing time in Flink by below-mentioned code JobExecutionResult jobExecutionResult = envrionment.execute("CEP engine "); System.out.println("Processing time = " +…
Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
0
votes
1 answer

sending DataStream from VM socket to Kafka and receiving on Host OS's Flink program : Deserialization Issue

I am sending data stream from VM to Kafka's test topic (running on host OS at 192.168.0.12 IP ) using code below public class WriteToKafka { public static void main(String[] args) throws Exception { StreamExecutionEnvironment env =…
Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
0
votes
1 answer

send dataStream from VM socket / remote socket to Flink program running on Host OS

As mentioned in Flink documentation, I was able to read text input from text server by opening a local socket using amar@admin:~$ nc -l 12345 and then receiving it on Flink program using DataStream text = env.socketTextStream("localhost",…
Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
0
votes
1 answer

warnings.print() prints events in reverse order(last event first ) excepts first event in Apache Flink CEP

I am trying to filter all temp events that are > 10 in Flink using below pattern, Pattern warningPattern = Pattern.begin("first") .subtype(TemperatureEvent.class) .where(new…
0
votes
2 answers

Why can the same events of a PatternStream be sent to both the PatternSelectFunction and the PatternTimeoutFunction?

I have to collect 3 events in 3 kafka sourced streams having the same correlationId in a given time, and be able to collect all or part of these events if they arrive late. I used a union on the 3 DataStream and a CEP pattern. But I notice that…