I am getting Null-pointer exception when using control stream and publishing data through kafka to input stream. When I debugged I found that somehow the EventListener( SiddhiStreamOperator --> AbstractSiddhiOperator) siddhiRuntimeHandlers map is empty and doesn't have the added rule from the control stream.
Steps:
created two kafka topics one for data stream and one for control stream
Published the rule in the rule stream kafka Topic first
Debugged and saw that it create 8 instances of AbstractSiddhiOperator all with the siddhiRuntimeHandlers map set with the rule published.
Published the data in the data kafka Topic
While debugging I saw that the AbstractSiddhiOperator instance used to evaluate the data doesn't have siddhiRuntimeHandlers map populated with the rule id and runtime handler instance and so it failed with Nullpointer exception.
Am I missing something here due to which the handler is not getting set in the AbstractSiddhiOperator instance while ingesting the data.
hi @haoch ,
Steps:
created two kafka topics one for data stream and one for control stream
used control stream in cep.cql:
DataStream inputStream = getInputDataStream(env).filter(r -> r != null && r.trim() != "" && r.contains("s3log"));
DataStream ruleStream = getRuleStream(env).filter(r -> r != null );
cep.registerStream("inputStream", inputStream, "s3log");
started the flink siddhi application
Published the rule in the rule stream kafka Topic first
Published the data in the data kafka Topic
Any help will be great.
Regards Dipanjan