Hi Chamila,

On 12 January 2014 21:14, Chamila Wijayarathna <[email protected]> wrote:

> Hi all,
> After replacing input stream with "org.wso2.log_analyzer.out", execution
> plan is now shown as in active state.
> Updated configuration for execution plan -
>
>  *<?xml version="1.0" encoding="UTF-8"?>*
> *<executionPlan name="log_analyzer_test" 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="info1" name="org.wso2.log_analyzer.out" version="1.0.0"/>*
>  *  </importedStreams>*
> *  <queryExpressions><![CDATA[from info1*
> *select SrcIp, DestIp*
> *insert into out1;]]></queryExpressions>*
> *  <exportedStreams>*
> *    <stream name="out1" valueOf="out1" version="1.0.0"/>*
> *  </exportedStreams>*
> </executionPlan>
>
> So I believe this means that every input stream we used in an execution
> plan should be an output from an event builder.
>

Yes, that is more or less correct. Of course, it need not be a stream
exported by event builder exactly, since you can get the events from a
stream exported by the execution plan as well.

The flow is as follows.

Input Event Adaptor -> Event Builder uses a mapping to transform to a
Stream (Unless custom mapping is disabled for event builder) -> Execution
plan consumes events from the streams imported

Execution plan can only consume from streams that has a corresponding event
junction. These event junctions are created when an event builder exports a
stream or when the execution plan exports the stream. In the above
scenario, no configuration was exporting org.wso2.log_analyzer.netflow.info1
stream. Therefore, the execution plan was unable to detect a corresponding
stream junction for org.wso2.log_analyzer.netflow.info1 stream.

If you want to let the events from org.wso2.log_analyzer.netflow.info1 hit
the execution plan directly without a custom mapping by the event builder,
you can simply disable custom mapping in the event builder configuration.

e.g.

*<mapping customMapping="disable" type="wso2event">*

Thanks,
Lasantha

Thank you for helping.
>
>
> On Sun, Jan 12, 2014 at 9:17 AM, Mohanadarshan Vivekanandalingam <
> [email protected]> wrote:
>
>>
>> Hi Chamila,
>>
>> How many event builders do you have?
>>> In your Execution Plan your are using the input stream as 
>>> "org.wso2.log_analyzer.netflow.info1"
>>> , hence you should also have a Event Builder outputting
>>> org.wso2.log_analyzer.netflow.info1
>>>
>>>
>> +1.. Yes, Please check on that.. I think better if we can have a chat
>> tomorrow and resolve this..  If there are any documentations lack on this
>> then we can fix that also..
>>
>> Thanks,
>> Mohan
>>
>>
>>
>>> In your case Event Builder is outputting org.wso2.log_analyzer.out.
>>> Therefore use org.wso2.log_analyzer.out as the input stream in the
>>> Execution plan.
>>>
>>> Regards
>>> Suho
>>>
>>> On Saturday, January 11, 2014, Chamila Wijayarathna wrote:
>>>
>>>> Hi Mohan,
>>>> Yes I only have the above mentioned execution plan configuration.
>>>>
>>>> Event Builder -
>>>>
>>>> *<?xml version="1.0" encoding="UTF-8"?>*
>>>> *<eventBuilder name="logger3" statistics="disable" trace="enable"
>>>> xmlns="http://wso2.org/carbon/eventbuilder
>>>> <http://wso2.org/carbon/eventbuilder>">*
>>>> *    <from eventAdaptorName="DefaultWSO2EventInputAdaptor"
>>>> eventAdaptorType="wso2event">*
>>>> *        <property
>>>> name="stream">org.wso2.log_analyzer.netflow.info1</property>*
>>>> *        <property name="version">1.0.0</property>*
>>>> *    </from>*
>>>> *    <mapping customMapping="enable" type="wso2event">*
>>>> *        <property>*
>>>> *            <from dataType="meta" name="referer"/>*
>>>> *            <to name="meta_referer" type="string"/>*
>>>> *        </property>*
>>>> *        <property>*
>>>> *            <from dataType="payload" name="SrcIp"/>*
>>>> *            <to name="SrcIp" type="string"/>*
>>>> *        </property>*
>>>> *        <property>*
>>>> *            <from dataType="payload" name="DestIp"/>*
>>>> *            <to name="DestIp" type="string"/>*
>>>> *        </property>*
>>>> *        <property>*
>>>> *            <from dataType="payload" name="size"/>*
>>>> *            <to name="size" type="string"/>*
>>>> *        </property>*
>>>> *        <property>*
>>>> *            <from dataType="payload" name="timestamp"/>*
>>>> *            <to name="timestamp" type="string"/>*
>>>> *        </property>*
>>>> *    </mapping>*
>>>> *    <to streamName="org.wso2.log_analyzer.out" version="1.0.0"/>*
>>>> *</eventBuilder>*
>>>>
>>>> org.wso2.log_analyzer.netflow.info1 -
>>>>
>>>> StreamDefinition{ streamId='org.wso2.log_analyzer.netflow.info1:1.0.0',
>>>> name='org.wso2.log_analyzer.netflow.info1', version='1.0.0',
>>>> nickName='Statistics', description='Service statistics', tags=null,
>>>> metaData=[Attribute{name='referer', type=STRING}], correlationData=null,
>>>> payloadData=[Attribute{name='SrcIp', type=STRING}, Attribute{name='DestIp',
>>>> type=STRING}, Attribute{name='size', type=STRING},
>>>> Attribute{name='timestamp', type=STRING}], }
>>>>
>>>> out1 -
>>>>
>>>> StreamDefinition{ streamId='out1:1.0.0', name='out1', version='1.0.0',
>>>> nickName='', description='', tags=null, metaData=null,
>>>> correlationData=null, payloadData=[Attribute{name='SrcIp', type=STRING},
>>>> Attribute{name='DestIp', type=STRING}], }
>>>>
>>>> Thank You
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, Jan 11, 2014 at 6:37 AM, Mohanadarshan Vivekanandalingam <
>>>> [email protected]> wrote:
>>>>
>>>> Have you properly removed the invalid configs and tried again..
>>>> If yes then share the event builder of this config and 
>>>> org.wso2.log_analyzer.netflow.info1
>>>> stream definition
>>>> then we can check what went wrong and let you know..
>>>>
>>>> Thanks,
>>>> Mohan
>>>>
>>>>
>>>> On Sat, Jan 11, 2014 at 12:45 AM, Chamila Wijayarathna <
>>>> [email protected]> wrote:
>>>>
>>>> Hi Mohan,
>>>> I did the changes you suggested and below is the new configuration.
>>>>
>>>> *<?xml version="1.0" encoding="UTF-8"?>*
>>>> *<executionPlan name="log_analyzer_test" 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="info1" name="org.wso2.log_analyzer.netflow.info1"
>>>> version="1.0.0"/>*
>>>> *  </importedStreams>*
>>>> *  <queryExpressions><![CDATA[from info1*
>>>> *select SrcIp, DestIp*
>>>> *insert into out1;]]></queryExpressions>*
>>>> *  <exportedStreams>*
>>>> *    <stream name="out1" valueOf="out1" version="1.0.0"/>*
>>>>
>>>> But I am still getting the same error. I made the out1 stream using
>>>> "Create Execution Plan" after writing the query.
>>>>
>>>> Thank You.
>>>> *  </exportedStreams>*
>>>> *</executionPlan>*
>>>>
>>>>
>>>> On Fri, Jan 10, 2014 at 5:49 PM, Mohanadarshan Vivekanandalingam <
>>>> [email protected]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> On Fri, Jan 10, 2014 at 5:25 PM, Chamila Wijayarathna <[email protected]
>>>> > wrote:
>>>>
>>>> Hello all,
>>>> I wrote a simple execution plan with following configuration.
>>>>
>>>> *<?xml version="1.0" encoding="UTF-8"?>*
>>>> *<executionPlan name="log_analyzer_test" statistics="enable"*
>>>> *  trace="enable" 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="info1" name="org.wso2.log_analyzer.netflow.info1"
>>>> version="1.0.0"/>*
>>>> *  </importedStreams>*
>>>> *  <queryExpressions><![CDATA[from info1*
>>>> *select SrcIp, DestIp*
>>>> *insert into out;]]></queryExpressions>*
>>>> <
>>>>
>>>>
>>>
>>> --
>>>
>>> *S. Suhothayan *
>>> Associate Technical Lead,
>>>  *WSO2 Inc. *http://wso2.com
>>> * <http://wso2.com/>*
>>> lean . enterprise . middleware
>>>
>>>
>>> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
>>> http://suhothayan.blogspot.com/ <http://suhothayan.blogspot.com/> twitter:
>>> http://twitter.com/suhothayan <http://twitter.com/suhothayan> | linked-in:
>>> http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>*
>>>
>>>
>>>
>>
>>
>> --
>> *V. Mohanadarshan*
>> *Software Engineer,*
>> *Data Technologies Team,*
>> *WSO2, Inc. http://wso2.com <http://wso2.com> *
>> *lean.enterprise.middleware.*
>>
>> email: [email protected]
>> phone:(+94) 771117673
>>
>
>
>
> --
> *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
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to