Hi,

Used the attached patch and it gave desired results.

09:14:19,322 [-] [Thread-19]  INFO TenantId=-1234 : Event Builder :
mapBuilder, before processing
{DPkts= 0, SrcAddr= 6.0.0.3, DstAddr= 3.236.0.0, First= 0, DstAS= 200,
DstMask= 233, SrcPort= 0, SrcMask= 22, Prot= 0, Last= 0, InputIf=
10502, TOS= 0, CurrentTime=2014-02-03 09:14:19, DOctets= 0, NextHop=
1.67.245.226, SrcAS= 256, TcpFlags= 0, DstPort= 0, OutputIf= 0}

09:14:19,322 [-] [Thread-19]  INFO TenantId=-1234 : Event Builder :
mapBuilder : Event Stream : srcAddrAndCurrentTime:1.0.0 , after
processing
[ 6.0.0.3, 2014-02-03 09:14:19]

[SrcAddr , CurrentTime ]

Thank you.


On Sat, Feb 1, 2014 at 7:03 PM, Asiri Liyana Arachchi <[email protected]>wrote:

> Okay. I'll try it and let you know on Monday. Can't test it because of the
> IP issue.
>
> Thank you
>
>
> On Sat, Feb 1, 2014 at 6:56 PM, Mohanadarshan Vivekanandalingam <
> [email protected]> wrote:
>
>> Hi Asiri,
>>
>> Use the attached patch for the moment.. Apply it to the CEP server (I
>> have created it from the diff given by Lasantha)..
>>
>> Thanks,
>> Mohan
>>
>>
>>
>> On Sat, Feb 1, 2014 at 6:27 PM, Lasantha Fernando <[email protected]>wrote:
>>
>>> Patch attached for issue. Please apply the patch and rebuild
>>> event-builder core and replace the corresponding jar in plugins folder.
>>>
>>> Thanks for raising this issue.
>>>
>>>
>>> On 1 February 2014 12:25, Lasantha Fernando <[email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> Yes, looks like a bug. I was also able to reproduce.... :-(
>>>>
>>>> Created JIRA at [1]. Will attach patch and test cases as well. We
>>>> should have had test cases for scenarios like this...
>>>>
>>>> [1] https://wso2.org/jira/browse/CEP-655
>>>>
>>>> Thanks,
>>>> Lasantha
>>>>
>>>>
>>>> On 31 January 2014 23:30, Mohanadarshan Vivekanandalingam <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Asiri,
>>>>>
>>>>> I am able to reproduce above mentioned situation.. As per my
>>>>> understanding there is an issue with Map mapping logic.. Will investigate
>>>>> further and get back to you..
>>>>>
>>>>> @Lasantha - I think you have more context on this.. WDYT??
>>>>>
>>>>> Regards,
>>>>> Mohan
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Jan 31, 2014 at 10:45 PM, Asiri Liyana Arachchi <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> 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 <
>>>>>> [email protected]> 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 <
>>>>>>> [email protected]> 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: [email protected]
>>>>>>>>> phone:(+94) 771117673
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> *V. Mohanadarshan*
>>>>>>>> *Software Engineer,*
>>>>>>>> *Data Technologies Team,*
>>>>>>>> *WSO2, Inc. http://wso2.com <http://wso2.com> *
>>>>>>>> *lean.enterprise.middleware.*
>>>>>>>>
>>>>>>>> email: [email protected]
>>>>>>>> phone:(+94) 771117673
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> *Asiri Liyana Arachchi*
>>>>>>> Engineering Intern,
>>>>>>> WSO2 Inc.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *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: [email protected]
>>>>> phone:(+94) 771117673
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Lasantha Fernando*
>>>> Software Engineer - Data Technologies Team
>>>> WSO2 Inc. http://wso2.com
>>>>
>>>> email: [email protected]
>>>> mobile: (+94) 71 5247551
>>>>
>>>
>>>
>>>
>>> --
>>> *Lasantha Fernando*
>>> Software Engineer - Data Technologies Team
>>> WSO2 Inc. http://wso2.com
>>>
>>> email: [email protected]
>>> mobile: (+94) 71 5247551
>>>
>>
>>
>>
>> --
>> *V. Mohanadarshan*
>> *Software Engineer,*
>> *Data Technologies Team,*
>> *WSO2, Inc. http://wso2.com <http://wso2.com> *
>> *lean.enterprise.middleware.*
>>
>> email: [email protected]
>> phone:(+94) 771117673
>>
>
>
>
> --
> *Asiri Liyana Arachchi*
> Engineering Intern,
> WSO2 Inc.
>



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

Reply via email to