如何使用 Apache Flink 分析事件序列来触发动作?
How to analyze event sequences with Apache Flink to trigger actions?
我想使用 Apache Flink 实时分析事件流并根据以下条件触发操作:
- 事件 windows,其中发生了特定事件 ("if event A and event B occurred within 30 seconds -> trigger action")
- 事件序列,其中发生了特定事件 ("if event A occurred after event B and event C occurred after event B -> trigger action")
- 两者的组合
我知道 flink 可以通过 stream.windowAll(...)
进行窗口化,但我不确定如何反映事件序列。
如何实现这样的事件序列检测?
FlinkCEP (https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/libs/cep.html) 是一个 CEP(复杂事件处理)库,能够以更抽象的方式处理事件流,并且(除其他外)涵盖您描述的场景。
我想使用 Apache Flink 实时分析事件流并根据以下条件触发操作:
- 事件 windows,其中发生了特定事件 ("if event A and event B occurred within 30 seconds -> trigger action")
- 事件序列,其中发生了特定事件 ("if event A occurred after event B and event C occurred after event B -> trigger action")
- 两者的组合
我知道 flink 可以通过 stream.windowAll(...)
进行窗口化,但我不确定如何反映事件序列。
如何实现这样的事件序列检测?
FlinkCEP (https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/libs/cep.html) 是一个 CEP(复杂事件处理)库,能够以更抽象的方式处理事件流,并且(除其他外)涵盖您描述的场景。