Code Monkey home page Code Monkey logo

flink-cepplus's Introduction

Flink1.8.1-CEPplus

基于Flink1.8.1源码 为CEP模块添加 逻辑动态注入功能

功能描述: 使用CEP作为复杂事件处理引擎时,当逻辑频繁发生修改,以及阈值频繁调整时
          整个程序需要停止后,修改代码,重新打包程序然后给集群提交,无法实现逻辑
          动态修改和外部动态注入,目前已经实现了CEP逻辑动态注入,基于消息驱动逻
          辑修改,可以手动往source端注入特定消息实现细腻度控制逻辑注入感知     

为Client端API中PatternStream添加方法registerListener(CepListener cepListener) 注意必须在select方法之前调用

cepListener对象需要实现接口CepListener

接口方法

    Boolean needChange()      每条数据会调用这个方法,用于确定这条数据是否会触发规则更新
    Pattern returnPattern()   触发更新时调用,用于返回新的pattern作为新规则

整个工程编译以后可以直接运行

mvn clean install -Dmaven.test.skip=true

功能测试代码

org.apache.flink.streaming.examples.cep.Driver

flink-cepplus's People

Contributors

ljygz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.