Let me explain a scenario which I need to handle. Let us assume three devices A,B,C are sending logs to the flink CEP for processing. Let us assume the pattern as A followed by 5 mins B which is followed by C in 5 mins. Let us assume a scenario where B device is down and send the logs after 50 mins. So in this case all events will be dropped. I'm just curious to know if there is any support in flink to maintain the state upto a particular defined interval (lets say in my case 1 day which means both A and C logs will be stored for 1 day post which the logs will be dropped in case of no match).Kindly suggest the feasibility in the CEP point of view.
How to specify the time for which the state should be maintained in Flink CEP
103 Views Asked by JDForLife At
1
There are 1 best solutions below
Related Questions in APACHE-FLINK
- Fine grained resource mangement and heap memory in flink task slot
- Does parallel flink tasks affect each other if they are unioned at the end?
- I am facing issue with ParquetFileWriting n hdfs in flink where parquet file size is around 382 KB . I want the parquet file in MB
- Apache Flink (AWS) does not recognize saved temporary function
- Flink 1.19 error Cannot determine simple type name "com"
- Unsupported options found for 'hudi'
- Flink 1.18 register custom API endpoint handler
- Flink Stuck on Broadcast
- Blunder about RichCoFlatMapFunction in flink 1.17.2 according to the official leanring guide
- Is there a way to store & retrieve a window's state in flink
- puzzled with flink window state
- Flink 1.15.2 OOM issue due to RocksDB
- How to create custom metrics with labels (python SDK + Flink Runner)
- flink-rpc-akka-loader - Security Vulnerability Issues
- I am new to Apache Flink and getting error FileNotFoundError: [WinError 2] at in_streaming_mode() The system cannot find the file specified
Related Questions in FLINK-STREAMING
- Fine grained resource mangement and heap memory in flink task slot
- Flink 1.19 error Cannot determine simple type name "com"
- Getting FlinkRuntime Exception during oracle exactly once jdbc sink
- Is there a way to store & retrieve a window's state in flink
- puzzled with flink window state
- Flink 1.15.2 OOM issue due to RocksDB
- If I emit an event from an operator after holding it in state for certain duration will the downstream operator accept it if it is past the watermark?
- How to write to Kafka Topic(Or to a file) from a Flink Stream
- Flink marks source late arriving events
- Why is flink UI not showing the right numbers?
- Union of bounded and unbounded streams in flink
- gRPC Connection Cancelled with "Multiplexer Hanging Up" Error in PyFlink
- Delta Lake as ingress for Flink Stateful Functions
- implement custom partitioning with windowAll()
- implementation of RoundRobin partitioning in Apache Flink
Related Questions in FLINK-CEP
- Is there a way to store & retrieve a window's state in flink
- Sending a sideoutput when numRecordsOutPerSecond is equal to 0 in KeyedProcessFunction in Flink?
- Flink CPU grows gradually overtime resulting in a container kill
- How to use the datatype 'TIMESTAMP WITH TIME ZONE' in the creation of flink table
- Flink listener for Task failures and restarts
- Filtering a stream from another stream in one Flink execution
- Flink job not printing expected output from Kafka Source
- Flink CEP: Import Errors and Type Mismatches in Stroke Risk Alarm Application
- Table result to String
- How to reference nested objects in Flink cep SQL in MATCH_RECOGNIZE clause
- Flink cep MATCH_RECOGNIZE not processing all events
- Cannot load user class: org.apache.flink.connector.kafka.sink.KafkaSink
- flink Lookup join with unbounded stream and bounded hive table not working
- Flink Different checkpoints for different pipelines
- My flink pattern detection program only return the first match, not all matched patterns
Related Questions in FLINK-BATCH
- Encounter 502 during the process of sink data to openSearch in flink, how to make flink retry it?
- Apache Flink Job submission through REST API failed
- What is correct way to SUM total over full data from both unbounded (Kafka) and bounded (JDBC)?
- How to use apache flink to stream all the kafka topic into database tables at one configuration via JDBC?
- Apache Flink - Unable to get the filename after writing the csv file to S3
- Flink. Batch load data. Exception OOM
- How to use flink-fs-azure-hadoop plugin in pyflink 1.17.2?
- Flink-sql initial load in batch mode and then change to streaming mode
- flink kubernetes operator throws ReconciliationException: java.lang.NullPointerException while batch job has already finished
- How to consume files from S3 bucket using Flink with checkpoints for failure recovery
- RuntimeError: java.lang.UnsupportedOperationException: A serializer has already been registered for the state; re-registration is not allowed
- Flink job listener - not returning job execution result in openshift
- Flink Gauge - Gauge failed to update metrics to mutliple topics
- Flink 1.15: Error setting BATCH execution mode for DataStream API
- How to use flink CLI on windows using their docker approach
Related Questions in FLINK-STATEFUN
- Run an Apache flink job in python, using Kafka without Docker
- How to manage joining metadata against an event in Flink with large, rarely changing metadata
- Does the Flink Kubernetes Operator support the deployment of Apache Flink Stateful Functions?
- How to handling completion of multiple asynchronous messages and ensuring exactly-once semantic in Flink Statefun
- Programmatically determining when Flink Stateful Functions has fully processed a batch of Kafka events
- Multiple Flink Statefun jobs on the same Flink cluster
- In StateFun with Apache DataStream examples how do we connect to remote Stateful Functions
- Timeout issue with Flink Stateful Functions with Azure Event Hub Kafaka endpoint
- How can you set the parallelism for a specific ingress for an embedded statefun application
- What is the correct way to scale flink statefun remote function
- Is there a way to broadcast configuration into all task managers or all FlatMapFunctions?
- How can I programmatically terminate the Statefun Harness
- Using Flink connector within Flink StateFun
- Using AWS Kinesis with localstack and Apache Flink ingress
- Flink Statefun Under Backpressure application crashes
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There is not anything more specific than
untilorwithinas far as I know, but those are used to specify t. This depends on your exact setup, but if You take all data into a single topic it may be hard to guard against devices being down for longer periods of time. You can try modifying the watermark generation logic, but this means that it will delay output in general.In this case, You may consider using
ProcessFunctionwith custom logic which is more flexible and will allow You to handle state with better granularity.EDIT:
So, basically You would need to create a state to hold partial matches, depending on the case it could be a
ListStateorValueStateand then simply put there any partial matches that you find. So, if You want A -> B -> C, then if You have A you would check and put it into the state, then if you receive B, you can check timestamps and append it to the state and finally if You have C you can emit the whole match and clear the state.If You set stateTTL there, this would just assert that the state will be automatically cleaned after it's not read/written for some time.
Please also note that this makes sense if the patterns are not very complex otherwise it can quickly become a nightmare to code the logic.