Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

测试用例最后一个例子为什么会空指针异常 #64

Open
CCweixiao opened this issue Apr 25, 2020 · 0 comments
Open

测试用例最后一个例子为什么会空指针异常 #64

CCweixiao opened this issue Apr 25, 2020 · 0 comments

Comments

@CCweixiao
Copy link

测试用例最后一个例子为什么会空指针异常

   @Test
    public void testDynamicalStreamSimplePatternMatch2() throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        DataStream<Event> input1 = env.addSource(new RandomEventSource(30).setName("event_stream_1"));

        DataStream<ControlEvent> controlStream = env.addSource(new SourceFunction<ControlEvent>() {
            @Override
            public void run(SourceContext<ControlEvent> sourceContext) throws InterruptedException {
                sourceContext.collect(MetadataControlEvent.builder()
                        .addExecutionPlan("1", "from input select  *  insert into output;")
                        .build());
                sourceContext.collect(OperationControlEvent.enableQuery("1"));

            }

            @Override
            public void cancel() {
            }
        });
        SiddhiCEP cep = SiddhiCEP.getSiddhiEnvironment(env);
        cep.registerStream("input",input1,"id","name");
        cep.from("input")
                .cql(controlStream).returnAsRow("output").print();

        //SiddhiCEP.define("input", input1,"id","name")

        env.execute();
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant