Stream Definition

srcAddrAndCurrentTime
1.0.0
StreamDefinition{ streamId='srcAddrAndCurrentTime:1.0.0',
name='srcAddrAndCurrentTime', version='1.0.0', nickName='', description='',
tags=null, metaData=null, correlationData=null,
payloadData=[Attribute{name='SrcAddr', type=STRING},
Attribute{name='CurrentTime', type=STRING}], }


On Fri, Jan 31, 2014 at 10:10 PM, Asiri Liyana Arachchi <asi...@wso2.com>wrote:

> Here is the event builder configuration.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <eventBuilder name="mapBuilder" statistics="enable" trace="enable" xmlns="
> http://wso2.org/carbon/eventbuilder";>
>     <from eventAdaptorName="adaptor" eventAdaptorType="netflow-udp">
>         <property name="topic">topic</property>
>     </from>
>     <mapping customMapping="enable" type="map">
>         <property>
>             <from name="SrcAddr"/>
>             <to name="SrcAddr" type="string"/>
>         </property>
>         <property>
>             <from name="CurrentTime"/>
>             <to name="CurrentTime" type="string"/>
>         </property>
>     </mapping>
>     <to streamName="srcAddrAndCurrentTime" version="1.0.0"/>
> </eventBuilder>
>
>
> On Fri, Jan 31, 2014 at 5:58 PM, Mohanadarshan Vivekanandalingam <
> mo...@wso2.com> wrote:
>
>> Forwarding again..
>>
>>
>>>  Hi Asiri,
>>>>
>>>
>>
>>>
>>>
>>>>
>>>>
>>>> eg:
>>>>
>>>> 17:11:29,145 [-] [Thread-19]  INFO TenantId=-1234 : Event Builder : 
>>>> mapBuilder, before processing
>>>>
>>>> {DPkts= 3961383612, SrcAddr= 1.67.232.35, DstAddr= 192.166.0.0, First= 0, 
>>>> DstAS= 0, DstMask= 0, SrcPort= 0, SrcMask= 0, Prot= 0, Last= 0, InputIf= 
>>>> 49318, TOS= 0, CurrentTime=2014-01-31 17:11:29, DOctets= 2905735168, 
>>>> NextHop= 1.67.232.35, SrcAS= 0, TcpFlags= 0, DstPort= 0, OutputIf= 46876}
>>>>
>>>> I mapped SrcAddr and CurrentTime in the builder and wrote it in to a
>>>> stream.
>>>> After processing  this is the result
>>>>
>>>>
>>>> 17:11:29,145 [-] [Thread-19]  INFO TenantId=-1234 : Event Builder : 
>>>> mapBuilder : Event Stream : srcAddrAndCurrentTime:1.0.0 , after processing
>>>> [ 3961383612,  1.67.232.35]
>>>>
>>>> It returns values in order without regarding the key value which I
>>>> mapped.
>>>> for SrcAddr = value of DPkts
>>>> for CurrentTime = value of SrcAddr
>>>>
>>>> I think it's because when adding the mappings builder shows
>>>> "Available Map(Key/Value) Mappings
>>>>  No Input mapping properties Defined      "
>>>>
>>>> How to fix this? What method should be used?
>>>>
>>>
>>> Map mapping is a common scenario which we have used and tested for many
>>> scenarios.. I think, there might be an issue with incoming event or event
>>> builder configuration..  Can you please attach the mapBuilder configuration
>>> that you have used here..
>>>
>>> Thanks,
>>> Mohan
>>>
>>
>>
>>>
>>>
>>>>
>>>>
>>>> Thank you.
>>>> --
>>>> *Asiri Liyana Arachchi*
>>>> Engineering Intern,
>>>> WSO2 Inc.
>>>>
>>>
>>>
>>>
>>> --
>>> *V. Mohanadarshan*
>>> *Software Engineer,*
>>> *Data Technologies Team,*
>>> *WSO2, Inc. http://wso2.com <http://wso2.com> *
>>> *lean.enterprise.middleware.*
>>>
>>> email: mo...@wso2.com
>>> phone:(+94) 771117673
>>>
>>
>>
>>
>> --
>> *V. Mohanadarshan*
>> *Software Engineer,*
>> *Data Technologies Team,*
>> *WSO2, Inc. http://wso2.com <http://wso2.com> *
>> *lean.enterprise.middleware.*
>>
>> email: mo...@wso2.com
>> phone:(+94) 771117673
>>
>
>
>
> --
> *Asiri Liyana Arachchi*
> Engineering Intern,
> WSO2 Inc.
>



-- 
*Asiri Liyana Arachchi*
Engineering Intern,
WSO2 Inc.
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to