Hi, I previously used "sum_calculator<https://10.100.4.42:9443/carbon/eventprocessor/execution_plan_details.jsp?ordinal=1&execPlan=sum_calculator>" execution plan's output stream "*currentsums*" as the input for "notify_High" execution plan which gave the exeption.
*<?xml version="1.0" encoding="UTF-8"?>* *<executionPlan name="sum_calculator" statistics="disable"* * trace="disable" xmlns="http://wso2.org/carbon/eventprocessor <http://wso2.org/carbon/eventprocessor>">* * <description/>* * <siddhiConfiguration>* * <property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>* * <property name="siddhi.enable.distributed.processing">false</property>* * </siddhiConfiguration>* * <importedStreams>* * <stream as="str" name="org.wso2.default.stream.nout" version="1.0.0"/>* * </importedStreams>* * <queryExpressions><![CDATA[from str[SrcIp contains '10.100.' and not (SrcIp contains '.10.100')]#window.time( 5 min )* *select SrcIp, sum(size) as bandwidth* *group by SrcIp* *insert into currentsums for current-events* *;* *]]></queryExpressions>* * <exportedStreams>* * <stream name="currentsums passthroughFlow="enable"* * valueOf="currentsums" version="1.0.0"/>* * </exportedStreams>* *</executionPlan>* By adding both queries in same execution plan as in following configuration solved the issue. *<?xml version="1.0" encoding="UTF-8"?>* *<executionPlan name="sum_calculator" statistics="disable"* * trace="disable" xmlns="http://wso2.org/carbon/eventprocessor <http://wso2.org/carbon/eventprocessor>">* * <description/>* * <siddhiConfiguration>* * <property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>* * <property name="siddhi.enable.distributed.processing">false</property>* * </siddhiConfiguration>* * <importedStreams>* * <stream as="str" name="org.wso2.default.stream.nout" version="1.0.0"/>* * </importedStreams>* * <queryExpressions><![CDATA[from str[SrcIp contains '10.100.' and not (SrcIp contains '.10.100')]#window.time( 5 min )* *select SrcIp, sum(size) as bandwidth* *group by SrcIp* *insert into currentsums for current-events* *;* *from currentsums[bandwidth>10000]* *select SrcIp* *insert into shouldNotify;]]></queryExpressions>* * <exportedStreams>* * <stream name="shouldNotify" passthroughFlow="enable"* * valueOf="shouldNotify" version="1.0.0"/>* * </exportedStreams>* *</executionPlan>* Thank You. On Thu, Jan 16, 2014 at 2:19 PM, Lasantha Fernando <[email protected]>wrote: > Hi, > > We had an offline chat and was able to resolve this issue by changing the > configurations so that both queries run on the same execution plan. > However, we were not able to find out the root cause of why the > configurations for separate execution plans did not work. > > @Chamila, can you share the all the configurations related that gives the > error so that we can look into it further? > > Thanks, > Lasantha > > > On 16 January 2014 13:06, Chamila Wijayarathna <[email protected]> wrote: > >> Hi Lasantha, >> >> event Builder - This input stream is coming from another execution plan, >> that plan is working properly and doesn't give any error when I remove >> *"notify_High" >> execution plan.* >> >> <?xml version="1.0" encoding="UTF-8"?> >> <eventBuilder name="currentsums_1.0.0_builder" statistics="disable" >> trace="disable" xmlns="http://wso2.org/carbon/eventbuilder"> >> <from eventAdaptorName="DefaultWSO2EventInputAdaptor" >> eventAdaptorType="wso2event"> >> <property name="stream">currentsums</property> >> <property name="version">1.0.0</property> >> </from> >> <mapping customMapping="disable" type="wso2event"/> >> <to streamName="currentsums" version="1.0.0"/> >> </eventBuilder> >> >> Console doesn't show any stack trace. It only shows >> >> [2014-01-16 11:14:50,295] ERROR - {EventJunction} Error while >> dispatching events >> java.lang.ArrayIndexOutOfBoundsException >> >> for each incoming event. >> I already checked it with event tracer, it shows messages similar to >> >> >> 13:00:26,209 [-] [DataBridge-Core-pool-2-thread-9] INFO TenantId=-1234 : >> Event Processor : notify_High,currentsums:1.0.0 (sums), before processing >> >> [Event{streamId='currentsums', timeStamp=1389857426209, data=[10.100.11.12, >> 1000], type=new}] >> >> So data part of the input stream is in the expected format. >> >> Thank You. >> >> >> >> On Thu, Jan 16, 2014 at 12:10 PM, Lasantha Fernando <[email protected]>wrote: >> >>> Hi Chamila, >>> >>> Can you post the event builder configuration as well? >>> >>> Also, if possible, please post the full stack trace of the error you get >>> as well. This would make it easier to get to the root cause of the issue.. >>> :-) >>> >>> You can enable tracing and look how the event comes to the execution >>> plan. This might give you a clue as to what is going wrong. >>> >>> Thanks, >>> Lasantha >>> >>> >>> >>> On 16 January 2014 10:58, Chamila Wijayarathna <[email protected]> wrote: >>> >>>> Hello all, >>>> I'm trying to run following execution plan on CEP. >>>> >>>> *<?xml version="1.0" encoding="UTF-8"?>* >>>> *<executionPlan name="notify_High" statistics="disable" trace="disable" >>>> xmlns="http://wso2.org/carbon/eventprocessor >>>> <http://wso2.org/carbon/eventprocessor>">* >>>> * <description/>* >>>> * <siddhiConfiguration>* >>>> * <property >>>> name="siddhi.persistence.snapshot.time.interval.minutes">0</property>* >>>> * <property >>>> name="siddhi.enable.distributed.processing">false</property>* >>>> * </siddhiConfiguration>* >>>> * <importedStreams>* >>>> * <stream as="sums" name="currentsums" version="1.0.0"/>* >>>> * </importedStreams>* >>>> * <queryExpressions><![CDATA[from sums[bandwidth>10000]* >>>> *select SrcIp* >>>> *insert into shouldNotify;]]></queryExpressions>* >>>> * <exportedStreams>* >>>> * <stream name="shouldNotify" passthroughFlow="enable"* >>>> * valueOf="shouldNotify" version="1.0.0"/>* >>>> * </exportedStreams>* >>>> *</executionPlan>* >>>> >>>> But when I'm sending events to CEP, it says that >>>> >>>> *ERROR - {EventJunction} Error while dispatching events* >>>> *java.lang.ArrayIndexOutOfBoundsException* >>>> >>>> I have set both input stream and output stream properly. >>>> >>>> *currentsums - * >>>> StreamDefinition{ streamId='currentsums:1.0.0', name='currentsums', >>>> version='1.0.0', nickName='', description='', tags=null, metaData=null, >>>> correlationData=null, payloadData=[Attribute{name='SrcIp', type=STRING}, >>>> Attribute{name='bandwidth', type=LONG}], } >>>> >>>> *shouldNotify - * >>>> StreamDefinition{ streamId='shouldNotify:1.0.0', name='shouldNotify', >>>> version='1.0.0', nickName='', description='', tags=null, metaData=null, >>>> correlationData=null, payloadData=[Attribute{name='SrcIp', type=STRING}], } >>>> >>>> What is the reason for this error? >>>> >>>> Thank You. >>>> >>>> >>>> -- >>>> *Chamila Wijayarathna* >>>> Engineering Intern, >>>> WSO2 Inc. >>>> >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> *Lasantha Fernando* >>> Software Engineer - Data Technologies Team >>> WSO2 Inc. http://wso2.com >>> >>> email: [email protected] >>> mobile: (+94) 71 5247551 >>> >> >> >> >> -- >> *Chamila Wijayarathna* >> Engineering Intern, >> WSO2 Inc. >> >> > > > -- > *Lasantha Fernando* > Software Engineer - Data Technologies Team > WSO2 Inc. http://wso2.com > > email: [email protected] > mobile: (+94) 71 5247551 > -- *Chamila Wijayarathna* Engineering Intern, WSO2 Inc.
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
