haoch / flink-siddhi

A CEP library to run Siddhi within Apache Flink™ Streaming Application (Not maintained)
Apache License 2.0
243 stars 96 forks source link

[DISCUSS] How to enable dynamic pattern ? #11

Open JasonChoi27 opened 6 years ago

JasonChoi27 commented 6 years ago

hi, haoch

I don't want to reload flink driver when add a new pattern or change one.

Here is my way: extend AbstractSiddhiOperator with implementing TwoInputStreamOperator, while one input accepts pattern stream and the other processes event. When receiving new pattern, reload SiddhiAppRuntime with new executionPlan.

Does it work for my case? Or is there a better way to enable dynamic pattern?

JasonChoi27 commented 6 years ago

MetadataControlEvent?

JasonChoi27 commented 6 years ago

ok, i have found the way.

 DataStream<Row> output = SiddhiCEP
            .define(...)
            .cql(DataStream<ControlEvent> controlStream)
            .return(...);
haoch commented 6 years ago

Yes, you could useControlEvent to broadcast to all operator as the interface for managing runtime dynamically.

haoch commented 5 years ago

Hi @shiveshsky,

Do you still have a problem? I am unable to check your comment on github.

Hao Chen

On Wed, Feb 27, 2019 at 2:31 PM shiveshsky notifications@github.com wrote:

I have imported flink-siddhi jar but I am not able to import the ControlEvent class as a type for my stream.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/haoch/flink-siddhi/issues/11#issuecomment-467741247, or mute the thread https://github.com/notifications/unsubscribe-auth/ABOSOQvxAwE06VEkLTHrTBartweUYZtVks5vRiY9gaJpZM4V_J6a .