0

I am using Flink CEP to recognize some event patterns, the query looks like

select * from $TABLE
    MATCH_RECOGNIZE(
        partition by $PARTITION_FIELDS
        order by event_time
        measures
            ...
        one row per match
        after match SKIP past LAST ROW
        pattern(...) within interval '1' minute
        define
            ...
    )

I enabled RocksDB state backend. I would like to check what the state data look like in RocksDB. By using RocksDB's Java API, the state data was retrieved successfully, however they are encoded.

I would like to know how and where Flink encodes those state data.

Thanks

Grant
  • 500
  • 1
  • 5
  • 18
  • You might start your investigation by looking at https://github.com/apache/flink/blob/release-1.11/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java and https://github.com/apache/flink/blob/release-1.11/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/operator/CepOperator.java. – David Anderson Oct 08 '20 at 12:27
  • @DavidAnderson Thanks for your reply. If I use FlinkCEP API directly, the generated query plan is also based on NFA and CepOperator? – Grant Oct 09 '20 at 05:12
  • The code I linked to is the low-level pattern matching engine in FlinkCEP. MATCH_RECOGNIZE is built on top of that. – David Anderson Oct 09 '20 at 07:45
  • @DavidAnderson Thanks, David – Grant Oct 12 '20 at 17:16

0 Answers0