Questions tagged [flink-cep]

FlinkCEP - complex event processing for Apache Flink

368 questions
0
votes
1 answer

The main method caused an error: No operators defined in streaming topology. Cannot execute

I have written the flink code to read the from pubsub. While executing the code with the command flink run Flink.jar I am getting the below mentioned error. I am using the flink version 1.9.3 Starting execution of…
0
votes
1 answer

Flink CEP not working with inEventTime() but works with inProcessingTime() when appied on a pattern

I am working on following program and have set WatermarkStrategy however when I run the program using inEventTime() method on pattern it does not give any output. Note : the same program works when I use inProcessingTime() on pattern. public class…
0
votes
1 answer

How do I find the event time difference between two non consecutive events in Flink?

I want to calculate the time difference between two non consecutive event in Apache Flink. An Event consists of a name and a timestamp. Ex: E1("A", timestamp) -> E2("B", timestamp) -> E3("C", timestamp) In this case I want to calculate the timestamp…
E. Marotti
  • 89
  • 7
0
votes
1 answer

Apply anomaly detection on Flink sliding windows

I am new to Flink, so I hope what I am saying makes sense. I would like to apply sliding windows to a DataStream, and then for each of those Windows to perform anomaly detection, using FlinkML or maybe FlinkCEP (in fact I want to use both). My…
0
votes
0 answers

Flink Event Time Window is not triggering

I am working with apache flink v1.4 and we want to fire our window using event time. I have made sure that: Time Characteristic have been set env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime); is present I am assigning the watermarks…
Anup
  • 73
  • 2
  • 10
0
votes
1 answer

Apache Flink - Nothing printed to the output, even if the exit code is 0

I am using Apache Flink 1.16.0 version. I am trying to do a simple CEP by printing the elements to the console For any reason, there is nothing printed to the console, even the process finished with exit code 0. Here is the code: import…
Adrian Cincu
  • 17
  • 1
  • 6
0
votes
1 answer

Apache Flink trigger that fires when state size threshold is reached

I would like to implement an apache flink trigger that will fire when the state accumulates 256MB. I would like to do this because my sink is writing parquet files to hdfs and i would like to run ETL on them later, which means I don’t want too small…
0
votes
0 answers

create new SideOut and add sink to it at runtime

I have Flink DataStream job that flows like this: before DataStream definition define list of Kafka Topics create Hashmap of string KafkaTopic -> SideOutput define Kafka Source during DataStream definition add Kafka Source to env using…
OpenCoderX
  • 6,180
  • 7
  • 34
  • 61
0
votes
1 answer

Can a source ignore unknown fields in Apache Flink?

Suppose I have a Kafka topic that will be pushed with events by many services, and I want to use Flink to handle these events. In addition, those events are heterogeneous but have several fields that are the same. For example, there are three common…
0
votes
1 answer

Write a pattern which groups events based on flink-cep

We are using flink-cep as a standalone library for finding out patterns in a list of events. Given the following list of events: val patientKey = "patient" val hrKey = "hr" // Event val p1e1 = Event("hr", mapOf(patientKey to 1, hr to 1)) val p1e2 =…
0
votes
0 answers

Flink custom window size based on user input?

Flink newbie here. I evaluating Flink to detect patterns in the stream. One of the requirements I have is to let the user decide how long to wait for the pattern to match before timing out. So, there can be multiple users each wanting a time window…
An SO User
  • 24,612
  • 35
  • 133
  • 221
0
votes
1 answer

Why does Flink CEP not match the pattern?

Flink newbie here. I have a local setup where Flink processes JSON events generated by Debezium. The idea is to monitor conversations happening between a customer support agent and a customer. If the customer support agent does not reply to a…
An SO User
  • 24,612
  • 35
  • 133
  • 221
0
votes
1 answer

how to Emit the output even if the pattern did not matched

Is it possible for Flink's CEP library to emit the data per input received? even if there is not any pattern matched? for example suppose there is this pattern pattern: ba input stream: a b a a expect output stream is: F F T F the default behavior…
0
votes
1 answer

providing context for next condition

I want to detect all sequences of the same integer that is followed by the count of these integers. is there any way to create this pattern with the Flink CEP library? suppose this: val input List(1,2,2,2,3,3,2,1,1,1,3,0,1) these sequences should…
0
votes
1 answer

Flink multi source with kafka, kinesis and TableEnvironment

I'm new to Flink and hope someone can help. I have tried to follow Flink tutorials. We have a requirement where we consume from: kafka topic. When an event arrives on kafka topic we need the json event fields (mobile_acc_id, member_id,…
user2279337
  • 691
  • 5
  • 13
  • 26