Re: [Dev] [Jaggery] Getting session variables by session id.

2015-02-14 Thread Asiri Liyana Arachchi
Hi Dakshika,

Thanks for the info. That's what I wanted to know.


Regards,

On Thu, Feb 5, 2015 at 6:09 PM, Dakshika Jayathilaka daksh...@wso2.com
wrote:

 Hi Asiri,

 AFAIK its not possible with current jaggery core. Current
 SessionHostObject doesn't expose method to retrieve Object itself.

 Here is the code:


 https://github.com/wso2/jaggery/blob/4d539fd3aed71a601c4788bcda691de7f0b039e0/components/hostobjects/org.jaggeryjs.hostobjects.web/src/main/java/org/jaggeryjs/hostobjects/web/SessionHostObject.java

 Regards,

 *Dakshika Jayathilaka*
 Software Engineer
 WSO2, Inc.
 lean.enterprise.middleware
 0771100911

 On Wed, Feb 4, 2015 at 4:25 PM, Asiri Liyana Arachchi asiriw...@gmail.com
  wrote:

 Hi Damith,

 Thanks for the reply. I've already read it. Using methods mention there
 it's possible to get the current session's values.
 Let's say for an example somehow  I have two session ID's  of two
 currently logged in users. I want to know if it's possible to access those
 users session data using their session ID's.

 Thanks.

 On Wed, Feb 4, 2015 at 3:10 PM, Damith Wickramasinghe dami...@wso2.com
 wrote:

 Hi Asiri,

 Please see the documentation below.[1] you should be able to access the
 session values using the given session id.

 [1] : http://jaggeryjs.org/documentation.jag?api=session

 Regards,
 Damith.

 On Wed, Feb 4, 2015 at 2:48 PM, Asiri Liyana Arachchi 
 asiriw...@gmail.com wrote:

 Hi all,

 In php there is a way to access session variables using session id. [1]
 How can that be done in jaggery. In jaggery session id can be retrieved
 (session.getId() )  but using that couldn't find a way to access session
 variables.

 Appreciate if anybody can help me on this.

 Thanks


 [1]:
 http://stackoverflow.com/questions/8726268/how-to-get-session-variables-using-session-id


 --
 *Asiri Liyana Arachchi*
 Undergraduate,
 Department of Computer Science  Engineering
 University of Moratuwa.

 Mobile : *+94711336652 %2B94711336652*
 Blog : *asirila.blogspot.com http://asirila.blogspot.com*
 LinkedIn : *www.linkedin.com/in/9asiri
 http://www.linkedin.com/in/9asiri*

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Software Engineer
 WSO2 Inc.; http://wso2.com
 http://www.google.com/url?q=http%3A%2F%2Fwso2.comsa=Dsntz=1usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg
 lean.enterprise.middleware

 mobile: *+94728671315 %2B94728671315*




 --
 *Asiri Liyana Arachchi*
 Undergraduate,
 Department of Computer Science  Engineering
 University of Moratuwa.

 Mobile : *+94711336652 %2B94711336652*
 Blog : *asirila.blogspot.com http://asirila.blogspot.com*
 LinkedIn : *www.linkedin.com/in/9asiri
 http://www.linkedin.com/in/9asiri*

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev





-- 
*Asiri Liyana Arachchi*
Undergraduate,
Department of Computer Science  Engineering
University of Moratuwa.

Mobile : *+94711336652*
Blog : *asirila.blogspot.com http://asirila.blogspot.com*
LinkedIn : *www.linkedin.com/in/9asiri http://www.linkedin.com/in/9asiri*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Jaggery] Getting session variables by session id.

2015-02-04 Thread Asiri Liyana Arachchi
Hi all,

In php there is a way to access session variables using session id. [1]
How can that be done in jaggery. In jaggery session id can be retrieved
(session.getId() )  but using that couldn't find a way to access session
variables.

Appreciate if anybody can help me on this.

Thanks


[1]:
http://stackoverflow.com/questions/8726268/how-to-get-session-variables-using-session-id


-- 
*Asiri Liyana Arachchi*
Undergraduate,
Department of Computer Science  Engineering
University of Moratuwa.

Mobile : *+94711336652*
Blog : *asirila.blogspot.com http://asirila.blogspot.com*
LinkedIn : *www.linkedin.com/in/9asiri http://www.linkedin.com/in/9asiri*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Jaggery] Getting session variables by session id.

2015-02-04 Thread Asiri Liyana Arachchi
Hi Damith,

Thanks for the reply. I've already read it. Using methods mention there
it's possible to get the current session's values.
Let's say for an example somehow  I have two session ID's  of two currently
logged in users. I want to know if it's possible to access those users
session data using their session ID's.

Thanks.

On Wed, Feb 4, 2015 at 3:10 PM, Damith Wickramasinghe dami...@wso2.com
wrote:

 Hi Asiri,

 Please see the documentation below.[1] you should be able to access the
 session values using the given session id.

 [1] : http://jaggeryjs.org/documentation.jag?api=session

 Regards,
 Damith.

 On Wed, Feb 4, 2015 at 2:48 PM, Asiri Liyana Arachchi asiriw...@gmail.com
  wrote:

 Hi all,

 In php there is a way to access session variables using session id. [1]
 How can that be done in jaggery. In jaggery session id can be retrieved
 (session.getId() )  but using that couldn't find a way to access session
 variables.

 Appreciate if anybody can help me on this.

 Thanks


 [1]:
 http://stackoverflow.com/questions/8726268/how-to-get-session-variables-using-session-id


 --
 *Asiri Liyana Arachchi*
 Undergraduate,
 Department of Computer Science  Engineering
 University of Moratuwa.

 Mobile : *+94711336652 %2B94711336652*
 Blog : *asirila.blogspot.com http://asirila.blogspot.com*
 LinkedIn : *www.linkedin.com/in/9asiri
 http://www.linkedin.com/in/9asiri*

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Software Engineer
 WSO2 Inc.; http://wso2.com
 http://www.google.com/url?q=http%3A%2F%2Fwso2.comsa=Dsntz=1usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg
 lean.enterprise.middleware

 mobile: *+94728671315 %2B94728671315*




-- 
*Asiri Liyana Arachchi*
Undergraduate,
Department of Computer Science  Engineering
University of Moratuwa.

Mobile : *+94711336652*
Blog : *asirila.blogspot.com http://asirila.blogspot.com*
LinkedIn : *www.linkedin.com/in/9asiri http://www.linkedin.com/in/9asiri*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [CEP] Using Siddhi as a java library

2014-12-09 Thread Asiri Liyana Arachchi
Hi Lasantha,

Thanks for the information. No, there's no reason to use an older version.
Changing the version and using the relevant language structure  worked.

Thank you.

Regards,
Asiri

On Thu, Dec 4, 2014 at 11:49 PM, Lasantha Fernando lasan...@wso2.com
wrote:

 Hi Asiri,

 Siddhi language structure changed somewhat on Siddhi-2.0.0 and above from
 the previous versions. From the execution plan you've provided, seems like
 you have used CEP 3.0.0 or 3.1.0, which had Siddhi 2.0.0 and 2.1.0
 respectively. So queries written for that CEP won't work with Siddhi 1.x.x
 versions. On those versions, the structure was like

 from in_stream_name[filters]#window_conditions
 insert into out_stream_name attribute1,attribute2,..., attribute n

 Above is the basic structure and not the correct definition. If you are
 using Siddhi-1.0.1, you can use [1] as a guide to the language structure.
 (Siddhi version to CEP version mapping is usually *CEP version = Siddhi
 version + 1.0.0*)

 By the way, any particular reason to use an older version of Siddhi?

 [1] https://docs.wso2.com/display/CEP201/Siddhi+Language+Specification

 Thanks,
 Lasantha


 On 4 December 2014 at 21:59, Asiri Liyana Arachchi asiriw...@gmail.com
 wrote:

 Hi all,

 I tried to run a siddhi query in a java application which works perfectly
 in wso2CEP.

 Query: (which works in wso2CEP) [1]

 from a=obd_speed,b=obd_speedselect b.speed-a.speed as speedDifference,b.time
 - a.time as timeInterval, b.time as timeStampinsert into
 obd_accele_calculation;


 Query in the java application ( Used the sample [2] )

  String queryReference = siddhiManager.addQuery(from  cseEventStream
 a=cseEventStream , b=cseEventStream  +

 select  b.price - a.price as priceDiff, symbol insert
 into StockQuote ;);
 Gives this error [3]

 Siddhi version used is 1.0.1 .
 Even failed with 2.1 and 2.2 (built from the source)

 Is the query in a wrong format?
 Any thoughts?

 Thank you

 [1] :
 https://github.com/Kampana/fyp-obd2/blob/master/cep-extentions/execution-plan
 [2] :
 https://svn.wso2.org/repos/wso2/people/suho/packs/siddhi/siddhi-1.0.1-wso2v1-samples.zip
 [3] : Exception in thread main
 org.wso2.siddhi.query.compiler.exception.SiddhiPraserException: line
 1:21 mismatched input 'a' expecting 'insert'

 at org.wso2.siddhi.query.compiler.SiddhiCompiler.parseQuery(
 SiddhiCompiler.java:104)

 at org.wso2.siddhi.core.SiddhiManager.addQuery(SiddhiManager.java:168)

 at org.wso2.siddhi.sample.TimeWindowSample.main(TimeWindowSample.java:47)

 Caused by: org.wso2.siddhi.query.compiler.exception.SiddhiPraserException:
 line 1:21 mismatched input 'a' expecting 'insert'

 at org.wso2.siddhi.query.compiler.SiddhiQLGrammarParser.emitErrorMessage(
 SiddhiQLGrammarParser.java:172)

 at org.antlr.runtime.BaseRecognizer.displayRecognitionError(
 BaseRecognizer.java:194)

 at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:186)

 at org.wso2.siddhi.query.compiler.SiddhiQLGrammarParser.outputStream(
 SiddhiQLGrammarParser.java:894)

 at org.wso2.siddhi.query.compiler.SiddhiQLGrammarParser.query(
 SiddhiQLGrammarParser.java:690)

 at org.wso2.siddhi.query.compiler.SiddhiCompiler.parseQuery(
 SiddhiCompiler.java:95)

 ... 2 more


 Regards,

 Asiri

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 *Lasantha Fernando*
 Software Engineer - Data Technologies Team
 WSO2 Inc. http://wso2.com

 email: lasan...@wso2.com
 mobile: (+94) 71 5247551

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [CEP] Using Siddhi as a java library

2014-12-04 Thread Asiri Liyana Arachchi
Hi all,

I tried to run a siddhi query in a java application which works perfectly
in wso2CEP.

Query: (which works in wso2CEP) [1]

from a=obd_speed,b=obd_speedselect b.speed-a.speed as speedDifference,b.time
- a.time as timeInterval, b.time as timeStampinsert into
obd_accele_calculation;


Query in the java application ( Used the sample [2] )

 String queryReference = siddhiManager.addQuery(from  cseEventStream
a=cseEventStream , b=cseEventStream  +

select  b.price - a.price as priceDiff, symbol insert into
StockQuote ;);
Gives this error [3]

Siddhi version used is 1.0.1 .
Even failed with 2.1 and 2.2 (built from the source)

Is the query in a wrong format?
Any thoughts?

Thank you

[1] :
https://github.com/Kampana/fyp-obd2/blob/master/cep-extentions/execution-plan
[2] :
https://svn.wso2.org/repos/wso2/people/suho/packs/siddhi/siddhi-1.0.1-wso2v1-samples.zip
[3] : Exception in thread main
org.wso2.siddhi.query.compiler.exception.SiddhiPraserException: line 1:21
mismatched input 'a' expecting 'insert'

at org.wso2.siddhi.query.compiler.SiddhiCompiler.parseQuery(
SiddhiCompiler.java:104)

at org.wso2.siddhi.core.SiddhiManager.addQuery(SiddhiManager.java:168)

at org.wso2.siddhi.sample.TimeWindowSample.main(TimeWindowSample.java:47)

Caused by: org.wso2.siddhi.query.compiler.exception.SiddhiPraserException:
line 1:21 mismatched input 'a' expecting 'insert'

at org.wso2.siddhi.query.compiler.SiddhiQLGrammarParser.emitErrorMessage(
SiddhiQLGrammarParser.java:172)

at org.antlr.runtime.BaseRecognizer.displayRecognitionError(
BaseRecognizer.java:194)

at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:186)

at org.wso2.siddhi.query.compiler.SiddhiQLGrammarParser.outputStream(
SiddhiQLGrammarParser.java:894)

at org.wso2.siddhi.query.compiler.SiddhiQLGrammarParser.query(
SiddhiQLGrammarParser.java:690)

at org.wso2.siddhi.query.compiler.SiddhiCompiler.parseQuery(
SiddhiCompiler.java:95)

... 2 more


Regards,

Asiri
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [CEP][stratos] Stratos single jvm cep aggregate functions issue

2014-08-21 Thread Asiri Liyana Arachchi
Hi,

Couldn't come online due to an unavoidable reason , sorry for the late
reply.

On Mon, Aug 18, 2014 at 12:24 PM, Reka Thirunavukkarasu r...@wso2.com
 wrote:

 Hi Asiri,

 If you are using stratos 4.0.0-RC4, then the concat operation in CEP might
 be missing. CEP 3.1.0 supports the concat where CEP 3.0.0 doesn't support
 it. We have added a extension to support concat with CEP 3.0.0 in Private
 PaaS. You can find the sample extension in [1]. Can you add this extension
 to Stratos 4.0.0-rc4 and try the same?

 You will need to add the class to
 STRATOS_HOME/repository/conf/siddhi/siddi.extesion as [2].

 [1]
 https://github.com/wso2/private-paas/blob/master/source/extensions/cep/stratos-cep-extension/src/main/java/org/apache/stratos/cep/extension/ConcatWindowProcessor.java

 [2]
 https://github.com/wso2/private-paas/blob/master/source/products/stratos/modules/distribution/src/main/conf/siddhi/siddhi.extension

 Thanks,
 Reka


Thanks for getting back to me. For the cep related changes I've used the
stratos master branch. It already contained the
 ConcatWindowProcessor.java. So it's not the issue.

On Mon, Aug 18, 2014 at 12:10 PM, Lasantha Fernando lasan...@wso2.com
 wrote:

 Hi Asiri,

 From the queries listed, it seems that you are using partitioned queries.
 If so, the aggregate will be given for each partition.

 Can you attach the relevant trace logs when the above issue occurs? The
 trace logs might help understand more what is happening underneath.

 Also, I think stratos uses CEP 3.0.0 instead of CEP 3.1.0. Therefore can
 you check with a CEP 3.0.0 standalone pack as well? However, no major
 changes were done to Siddhi when moving from CEP 3.0.0 to CEP 3.1.0. So
 Siddhi should behave exactly the same in both versions.

 Thanks,
 Lasantha


Thanks for your concern. I've attached the trace logs. Partitioning is done
by  avg_rif_cluster_partition attribute which is unique, as I'm sending
events only for one cluster. Even I tried removing it. Same results.



Regards,
Asiri

On Mon, Aug 18, 2014 at 12:24 PM, Reka Thirunavukkarasu r...@wso2.com
wrote:

 Hi Asiri,

 If you are using stratos 4.0.0-RC4, then the concat operation in CEP might
 be missing. CEP 3.1.0 supports the concat where CEP 3.0.0 doesn't support
 it. We have added a extension to support concat with CEP 3.0.0 in Private
 PaaS. You can find the sample extension in [1]. Can you add this extension
 to Stratos 4.0.0-rc4 and try the same?

 You will need to add the class to
 STRATOS_HOME/repository/conf/siddhi/siddi.extesion as [2].

 [1]
 https://github.com/wso2/private-paas/blob/master/source/extensions/cep/stratos-cep-extension/src/main/java/org/apache/stratos/cep/extension/ConcatWindowProcessor.java

 [2]
 https://github.com/wso2/private-paas/blob/master/source/products/stratos/modules/distribution/src/main/conf/siddhi/siddhi.extension

 Thanks,
 Reka


 On Mon, Aug 18, 2014 at 12:10 PM, Lasantha Fernando lasan...@wso2.com
 wrote:

 Hi Asiri,

 From the queries listed, it seems that you are using partitioned queries.
 If so, the aggregate will be given for each partition.

 Can you attach the relevant trace logs when the above issue occurs? The
 trace logs might help understand more what is happening underneath.

 Also, I think stratos uses CEP 3.0.0 instead of CEP 3.1.0. Therefore can
 you check with a CEP 3.0.0 standalone pack as well? However, no major
 changes were done to Siddhi when moving from CEP 3.0.0 to CEP 3.1.0. So
 Siddhi should behave exactly the same in both versions.

 Thanks,
 Lasantha


 On 17 August 2014 11:54, Asiri Liyana Arachchi asiriw...@gmail.com
 wrote:

 Hi all,

 I'm using this [1] execution plan inside stratos single jvm installation.

 select cluster_id,network_partition_id,avg(active_instances_count) as
 instances_count, avg(in_flight_request_count) as count , 
 *sum(served_request_count)
 as served_count*
  insert into average_in_flight_requests 

 *sum*  doesn't  give expected output. I've checked the same query with
 a standalone cep 3.1.0 and it gave desired results.
 for an example : served_request_count =10 sent for four times to CEP
 within a minute then the out put(served_count) is 80 (most of the time) or
 60 where it should be 40.

 I'm using stratos pack  4.0.0-rc4 (release )

 Can't figure out why this is happening. Any ideas?

 Thanks in advance.

 Regards,
 Asiri



 [1] : from avg_rif_stat
 select cluster_id, network_partition_id,active_instances_count,
 in_flight_request_count,served_request_count,
  stratos:concat(cluster_id, '-' , network_partition_id) as
 avg_rif_cluster_network
 insert into avg_rif_concat;
  define partition avg_rif_cluster_partition by
  avg_rif_concat.avg_rif_cluster_network;
 from avg_rif_concat#window.timeBatch(1 min)
  select cluster_id,network_partition_id,avg(active_instances_count) as
 instances_count, avg(in_flight_request_count) as count ,
 sum(served_request_count) as served_count
  insert into average_in_flight_requests
 partition

[Dev] [CEP][stratos] Stratos single jvm cep aggregate functions issue

2014-08-17 Thread Asiri Liyana Arachchi
Hi all,

I'm using this [1] execution plan inside stratos single jvm installation.

select cluster_id,network_partition_id,avg(active_instances_count) as
instances_count, avg(in_flight_request_count) as count ,
*sum(served_request_count)
as served_count*
 insert into average_in_flight_requests 

*sum*  doesn't  give expected output. I've checked the same query with a
standalone cep 3.1.0 and it gave desired results.
for an example : served_request_count =10 sent for four times to CEP within
a minute then the out put(served_count) is 80 (most of the time) or 60
where it should be 40.

I'm using stratos pack  4.0.0-rc4 (release )

Can't figure out why this is happening. Any ideas?

Thanks in advance.

Regards,
Asiri



[1] : from avg_rif_stat
select cluster_id, network_partition_id,active_instances_count,
in_flight_request_count,served_request_count,
 stratos:concat(cluster_id, '-' , network_partition_id) as
avg_rif_cluster_network
insert into avg_rif_concat;
 define partition avg_rif_cluster_partition by
 avg_rif_concat.avg_rif_cluster_network;
from avg_rif_concat#window.timeBatch(1 min)
 select cluster_id,network_partition_id,avg(active_instances_count) as
instances_count, avg(in_flight_request_count) as count ,
sum(served_request_count) as served_count
 insert into average_in_flight_requests
partition by avg_rif_cluster_partition;
 from average_in_flight_requests
 select cluster_id, network_partition_id,instances_count, served_count,
 stratos:divider(served_count , instances_count) as
requests_per_instance
 insert into served_requests_per_instance;
from served_requests_per_instance#window.timeBatch(10 min)
select cluster_id,network_partition_id, avg(requests_per_instance) as
average_served_count
 insert into average_served_request_count;
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] APIM Store stat query implementation details

2014-03-17 Thread Asiri Liyana Arachchi
(the reason) the change was done. We want reuse
 existing code as much as possible so keep that in mind as well.

 Please reply to this thread with any questions or clarifications that
 you need, don't assume anything, when in doubt ask.

 --
 Regards,
 Uvindra

 Mobile: 33962




 --
 /sumedha
 m: +94 773017743
 b :  bit.ly/sumedha




 --
 Regards,
 Uvindra

 Mobile: 33962








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


Re: [Dev] [CEP] router netflow udp input event adapter for cep. Maping issue

2014-02-02 Thread Asiri Liyana Arachchi
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 asi...@wso2.comwrote:

 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 
 mo...@wso2.com 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 lasan...@wso2.comwrote:

 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 lasan...@wso2.com 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 
 mo...@wso2.com 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 
 asi...@wso2.com 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 
 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=topictopic/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

Re: [Dev] [CEP] router netflow udp input event adapter for cep. Maping issue

2014-01-31 Thread Asiri Liyana Arachchi
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=topictopic/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.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [CEP] router netflow udp input event adapter for cep. Maping issue

2014-01-31 Thread Asiri Liyana Arachchi
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.comwrote:

 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=topictopic/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