Re: [Dev] How do I execute a piece of code when a connector is deployed/initialized?

2017-07-08 Thread Rajkumar Rajaratnam
Would implementing ManagedLifecycle be the option for this?

On Sat, Jul 8, 2017 at 11:20 PM, Rajkumar Rajaratnam 
wrote:

> Hi,
>
> I need to execute a piece of code to read some system variables and
> initialize my connector. I need to do this only once and IMO it's better to
> do this during connector deployment time. I don't want to execute this code
> again and again for every requests.
>
> How do I do this?
>
> Thanks.
>



-- 
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Senior Software Engineer, WSO2
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How do I execute a piece of code when a connector is deployed/initialized?

2017-07-08 Thread Rajkumar Rajaratnam
Hi,

I need to execute a piece of code to read some system variables and
initialize my connector. I need to do this only once and IMO it's better to
do this during connector deployment time. I don't want to execute this code
again and again for every requests.

How do I do this?

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


Re: [Dev] Problems on MB Cluster Enterprise Integrator 6.1.0

2017-07-08 Thread Hasitha Hiranya
Nice!

On Sat, Jul 8, 2017 at 10:40 PM, Júnior  wrote:

> Hi,
>
> I was able to find the problem.
>
> It was in broker.xml, I was using the same thrift server ip for both.
>
> When I used each ip address on the file, it worked.
>
> Thanks!
>
> 2017-07-07 17:56 GMT-03:00 Júnior :
>
>> Hello Hasitha,
>>
>> I have tried that, but I keep receiving this error message in the second
>> node:
>>
>>
>> oreImpl
>> TID: [-1234] [] [2017-07-07 20:51:13,838]  WARN
>> {org.wso2.andes.server.cluster.CoordinationConfigurableClusterAgent} -
>>  Node id was null for member Member [.xxx.X.X]:5711. Node id will be
>> read again after 2 seconds.
>>
>>
>> After 4 attempts it shutdown the node.
>>
>> Follow my axis2 configuration for clustering:
>>
>>
>>
>> 
>> true
>> aws
>> localhost
>>
>> 5711
>> accesskey
>> secretkey
>> secrutiy-group
>> us-east-2
>> ClusterName
>> mb_int
>>
>> 
>> 
>> https://${hostName}:${h
>> ttpsPort}/"/>
>> 
>> 
>>
>>  
>>
>>
>> When i start the second node, I can see in the logs that has joined the
>> cluster, but as it is not able to get the hazelcast node id of the first
>> node, it shutdowns the second one.
>>
>>
>> Any clue on this is very welcome.
>>
>> Thanks,
>>
>> 2017-07-05 14:20 GMT-03:00 Júnior :
>>
>>> Thank you Hasitha.
>>>
>>> It thought leaving it as default, it would generate one.
>>>
>>> The ports are open, I can see in the logs it saying the new member has
>>> joined, but it keeps trying to get the node id of the other member, and
>>> when it is not able to do, it shutdown the node.
>>>
>>> I will try and let you know the results.
>>>
>>> Thanks,
>>>
>>> 2017-07-05 8:52 GMT-03:00 Hasitha Hiranya :
>>>
 Hi,

 
 
 default

 Set a node id in broker.xml file at [EI_HOME]/wso2/broker/conf

 BTW, are necessary ports open for Hazelcast to communicate?

 Thanks

 On Mon, Jul 3, 2017 at 6:51 PM, Júnior  wrote:

> Hello,
>
> I am trying to setup a cluster for the Broker Profile on AWS.
>
> I am able to start the first node without problem, but when we start
> the second node, it doesn't start because it says it is not able to get 
> the
> node id of the other member:
>
> TID: [-1234] [] [2017-07-03 12:55:10,193] ERROR
> {org.wso2.andes.server.registry.ApplicationRegistry} -
>  org.wso2.andes.kernel.AndesException: Failed to read Node id of
> hazelcast member Member [X.X.X.X]:5711
>
> On the nodes I have leave the nodeId on broker.xml as default, so it
> will generate a random one.
>
> Do you have any clue on where should I set this node id?
>
> Thanks,
>
>
>
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 *Hasitha Abeykoon*
 Senior Software Engineer; WSO2, Inc.; http://wso2.com
 *cell:* *+94 719363063*
 *blog: **abeykoon.blogspot.com* 


>>>
>>>
>>> --
>>> Francisco Ribeiro
>>> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>>>
>>
>>
>>
>> --
>> Francisco Ribeiro
>> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>>
>
>
>
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>



-- 
*Hasitha Abeykoon*
Senior Software Engineer; WSO2, Inc.; http://wso2.com
*cell:* *+94 719363063*
*blog: **abeykoon.blogspot.com* 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Problems on MB Cluster Enterprise Integrator 6.1.0

2017-07-08 Thread Júnior
Hi,

I was able to find the problem.

It was in broker.xml, I was using the same thrift server ip for both.

When I used each ip address on the file, it worked.

Thanks!

2017-07-07 17:56 GMT-03:00 Júnior :

> Hello Hasitha,
>
> I have tried that, but I keep receiving this error message in the second
> node:
>
>
> oreImpl
> TID: [-1234] [] [2017-07-07 20:51:13,838]  WARN {org.wso2.andes.server.
> cluster.CoordinationConfigurableClusterAgent} -  Node id was null for
> member Member [.xxx.X.X]:5711. Node id will be read again after 2
> seconds.
>
>
> After 4 attempts it shutdown the node.
>
> Follow my axis2 configuration for clustering:
>
>
>
> 
> true
> aws
> localhost
>
> 5711
> accesskey
> secretkey
> secrutiy-group
> us-east-2
> ClusterName
> mb_int
>
> 
> 
> https://${hostName}:${
> httpsPort}/"/>
> 
> 
>
>  
>
>
> When i start the second node, I can see in the logs that has joined the
> cluster, but as it is not able to get the hazelcast node id of the first
> node, it shutdowns the second one.
>
>
> Any clue on this is very welcome.
>
> Thanks,
>
> 2017-07-05 14:20 GMT-03:00 Júnior :
>
>> Thank you Hasitha.
>>
>> It thought leaving it as default, it would generate one.
>>
>> The ports are open, I can see in the logs it saying the new member has
>> joined, but it keeps trying to get the node id of the other member, and
>> when it is not able to do, it shutdown the node.
>>
>> I will try and let you know the results.
>>
>> Thanks,
>>
>> 2017-07-05 8:52 GMT-03:00 Hasitha Hiranya :
>>
>>> Hi,
>>>
>>> 
>>> 
>>> default
>>>
>>> Set a node id in broker.xml file at [EI_HOME]/wso2/broker/conf
>>>
>>> BTW, are necessary ports open for Hazelcast to communicate?
>>>
>>> Thanks
>>>
>>> On Mon, Jul 3, 2017 at 6:51 PM, Júnior  wrote:
>>>
 Hello,

 I am trying to setup a cluster for the Broker Profile on AWS.

 I am able to start the first node without problem, but when we start
 the second node, it doesn't start because it says it is not able to get the
 node id of the other member:

 TID: [-1234] [] [2017-07-03 12:55:10,193] ERROR
 {org.wso2.andes.server.registry.ApplicationRegistry} -
  org.wso2.andes.kernel.AndesException: Failed to read Node id of
 hazelcast member Member [X.X.X.X]:5711

 On the nodes I have leave the nodeId on broker.xml as default, so it
 will generate a random one.

 Do you have any clue on where should I set this node id?

 Thanks,



 --
 Francisco Ribeiro
 *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*

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


>>>
>>>
>>> --
>>> *Hasitha Abeykoon*
>>> Senior Software Engineer; WSO2, Inc.; http://wso2.com
>>> *cell:* *+94 719363063*
>>> *blog: **abeykoon.blogspot.com* 
>>>
>>>
>>
>>
>> --
>> Francisco Ribeiro
>> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>>
>
>
>
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>



-- 
Francisco Ribeiro
*SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Getting and resorting snapshots of a SiddhiAppRuntime

2017-07-08 Thread Sriskandarajah Suhothayan
On Sat, Jul 8, 2017 at 1:19 PM Sriskandarajah Suhothayan 
wrote:

> On Sat, Jul 8, 2017 at 1:11 PM Minudika Malshan  wrote:
>
>> Hi,
>>
>> @Nirmal : It can be changed dynamically within extention. But cannot be
>> changed dynamically within the fileserver which is provided by carbon
>> transport.
>>
> We have to provide it as a property, when creating the server connector.
>>
>
> I this case you have to stop update and start back. Because changing
> during running  is also a valid case.
>

Hmm on my second thought I don't think you need to handle this. We'll fix
siddhi and make sure this case will not happen.

>
>>
>> @Suho : In that way, it works fine. I was thinking we cannot restore
>> snapshots without starting the siddhiAppRuntime. :) Thanks for the
>> suggestion.
>>
>> Thanks and regards!
>>
>>
>> On Sat, Jul 8, 2017 at 12:50 PM, Sriskandarajah Suhothayan > > wrote:
>>
>>> Can't we restore and then start siddhi?
>>>
>>> Regards
>>> Suho
>>>
>>> On Sat, Jul 8, 2017 at 12:42 PM Minudika Malshan 
>>> wrote:
>>>
 Hi,

 @Nirmal :
 I am trying on this siddhi-io-file. I was referring the code of
 siddi-io-kafka.

 @suho : Yes. It pause(), restoreState() and then resume(). But

 My issue is,
 I if the siddhiApp is shutted down, when it get started again, the
 method calls will happen in the following order.

 connect(), [when starting the runtime again]
 pause() and then restoreState() [when restoring the snapshot]
 and then,
 resume().

 I am starting the file server within connect method. For that, I need
 to give the file pointer(which is updated from snapshot) to the server, so
 that it can resume the file consuming process from the point where it
 stopped previously.

 Since the connect() method is called before restore() method, I cannot
 find the restored file pointer before starting the file server.

 Any comment on this? Should I move to the file server starting thing to
 resume() also?

 Thanks and regards!


 On Fri, Jul 7, 2017 at 10:25 PM, Nirmal Fernando 
 wrote:

> @Minudika Can you elaborate a bit? What code you're referring to?
>
> On Fri, Jul 7, 2017 at 8:45 PM, Sriskandarajah Suhothayan <
> s...@wso2.com> wrote:
>
>> To my knowledge it's doing a pause() restoreState() and then resume().
>>
>> Am I wrong?
>>
>> On Fri, Jul 7, 2017 at 6:28 PM, Minudika Malshan 
>> wrote:
>>
>>> Hi,
>>>
>>> When restarting a siddhiAppRuntime with restoring a snapshot of the
>>> source, it calls the connect() method in source and then restoreState()
>>> method.
>>>
>>> Since the source is supposed to do the process using previously
>>> captured state, shouldn't the order be restore() and then connect() ?
>>>
>>> Appreciate if you can help me to clarify this.
>>>
>>> Thanks and regards!
>>>
>>> --
>>> *Minudika Gammanpila*
>>> Software Engineer - WSO2
>>>
>>> Email   :  minud...@wso2.com
>>> Mobile :  +94715659887 <071%20565%209887>
>>> Web :  http://wso2.com 
>>>
>>
>>
>>
>> --
>>
>> *S. Suhothayan*
>> Associate Director / Architect
>> *WSO2 Inc. *http://wso2.com
>> * *
>> lean . enterprise . middleware
>>
>>
>> *cell: (+94) 779 756 757 <+94%2077%20975%206757> | blog:
>> http://suhothayan.blogspot.com/ twitter:
>> http://twitter.com/suhothayan  | 
>> linked-in:
>> http://lk.linkedin.com/in/suhothayan 
>> *
>>
>
>
>
> --
>
> Thanks & regards,
> Nirmal
>
> Technical Lead, WSO2 Inc.
> Mobile: +94715779733 <+94%2071%20577%209733>
> Blog: http://nirmalfdo.blogspot.com/
>
>
>


 --
 *Minudika Gammanpila*
 Software Engineer - WSO2

 Email   :  minud...@wso2.com
 Mobile :  +94715659887 <+94%2071%20565%209887>
 Web :  http://wso2.com 

>>> --
>>>
>>> *S. Suhothayan*
>>> Associate Director / Architect
>>> *WSO2 Inc. *http://wso2.com
>>> * *
>>> lean . enterprise . middleware
>>>
>>>
>>> *cell: (+94) 779 756 757 <+94%2077%20975%206757> | blog:
>>> http://suhothayan.blogspot.com/ twitter:
>>> http://twitter.com/suhothayan  | linked-in:
>>> http://lk.linkedin.com/in/suhothayan *
>>>
>>
>>
>>
>> --
>> *Minudika Gammanpila*
>> Software Engineer - WSO2
>>
>> Email   :  minud...@wso2.com
>> Mobile :  +94715659887
>> Web :  http://wso2.com 
>>
> --
>
> *S. 

Re: [Dev] Getting and resorting snapshots of a SiddhiAppRuntime

2017-07-08 Thread Sriskandarajah Suhothayan
On Sat, Jul 8, 2017 at 1:11 PM Minudika Malshan  wrote:

> Hi,
>
> @Nirmal : It can be changed dynamically within extention. But cannot be
> changed dynamically within the fileserver which is provided by carbon
> transport.
> We have to provide it as a property, when creating the server connector.
>

I this case you have to stop update and start back. Because changing during
running  is also a valid case.

>
>
> @Suho : In that way, it works fine. I was thinking we cannot restore
> snapshots without starting the siddhiAppRuntime. :) Thanks for the
> suggestion.
>
> Thanks and regards!
>
>
> On Sat, Jul 8, 2017 at 12:50 PM, Sriskandarajah Suhothayan 
> wrote:
>
>> Can't we restore and then start siddhi?
>>
>> Regards
>> Suho
>>
>> On Sat, Jul 8, 2017 at 12:42 PM Minudika Malshan 
>> wrote:
>>
>>> Hi,
>>>
>>> @Nirmal :
>>> I am trying on this siddhi-io-file. I was referring the code of
>>> siddi-io-kafka.
>>>
>>> @suho : Yes. It pause(), restoreState() and then resume(). But
>>>
>>> My issue is,
>>> I if the siddhiApp is shutted down, when it get started again, the
>>> method calls will happen in the following order.
>>>
>>> connect(), [when starting the runtime again]
>>> pause() and then restoreState() [when restoring the snapshot]
>>> and then,
>>> resume().
>>>
>>> I am starting the file server within connect method. For that, I need to
>>> give the file pointer(which is updated from snapshot) to the server, so
>>> that it can resume the file consuming process from the point where it
>>> stopped previously.
>>>
>>> Since the connect() method is called before restore() method, I cannot
>>> find the restored file pointer before starting the file server.
>>>
>>> Any comment on this? Should I move to the file server starting thing to
>>> resume() also?
>>>
>>> Thanks and regards!
>>>
>>>
>>> On Fri, Jul 7, 2017 at 10:25 PM, Nirmal Fernando 
>>> wrote:
>>>
 @Minudika Can you elaborate a bit? What code you're referring to?

 On Fri, Jul 7, 2017 at 8:45 PM, Sriskandarajah Suhothayan <
 s...@wso2.com> wrote:

> To my knowledge it's doing a pause() restoreState() and then resume().
>
> Am I wrong?
>
> On Fri, Jul 7, 2017 at 6:28 PM, Minudika Malshan 
> wrote:
>
>> Hi,
>>
>> When restarting a siddhiAppRuntime with restoring a snapshot of the
>> source, it calls the connect() method in source and then restoreState()
>> method.
>>
>> Since the source is supposed to do the process using previously
>> captured state, shouldn't the order be restore() and then connect() ?
>>
>> Appreciate if you can help me to clarify this.
>>
>> Thanks and regards!
>>
>> --
>> *Minudika Gammanpila*
>> Software Engineer - WSO2
>>
>> Email   :  minud...@wso2.com
>> Mobile :  +94715659887 <071%20565%209887>
>> Web :  http://wso2.com 
>>
>
>
>
> --
>
> *S. Suhothayan*
> Associate Director / Architect
> *WSO2 Inc. *http://wso2.com
> * *
> lean . enterprise . middleware
>
>
> *cell: (+94) 779 756 757 <+94%2077%20975%206757> | blog:
> http://suhothayan.blogspot.com/ twitter:
> http://twitter.com/suhothayan  | linked-in:
> http://lk.linkedin.com/in/suhothayan 
> *
>



 --

 Thanks & regards,
 Nirmal

 Technical Lead, WSO2 Inc.
 Mobile: +94715779733 <+94%2071%20577%209733>
 Blog: http://nirmalfdo.blogspot.com/



>>>
>>>
>>> --
>>> *Minudika Gammanpila*
>>> Software Engineer - WSO2
>>>
>>> Email   :  minud...@wso2.com
>>> Mobile :  +94715659887 <+94%2071%20565%209887>
>>> Web :  http://wso2.com 
>>>
>> --
>>
>> *S. Suhothayan*
>> Associate Director / Architect
>> *WSO2 Inc. *http://wso2.com
>> * *
>> lean . enterprise . middleware
>>
>>
>> *cell: (+94) 779 756 757 <+94%2077%20975%206757> | blog:
>> http://suhothayan.blogspot.com/ twitter:
>> http://twitter.com/suhothayan  | linked-in:
>> http://lk.linkedin.com/in/suhothayan *
>>
>
>
>
> --
> *Minudika Gammanpila*
> Software Engineer - WSO2
>
> Email   :  minud...@wso2.com
> Mobile :  +94715659887
> Web :  http://wso2.com 
>
-- 

*S. Suhothayan*
Associate Director / Architect
*WSO2 Inc. *http://wso2.com
* *
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
twitter: http://twitter.com/suhothayan
 | linked-in:
http://lk.linkedin.com/in/suhothayan *

Re: [Dev] Getting and resorting snapshots of a SiddhiAppRuntime

2017-07-08 Thread Sriskandarajah Suhothayan
Can't we restore and then start siddhi?

Regards
Suho

On Sat, Jul 8, 2017 at 12:42 PM Minudika Malshan  wrote:

> Hi,
>
> @Nirmal :
> I am trying on this siddhi-io-file. I was referring the code of
> siddi-io-kafka.
>
> @suho : Yes. It pause(), restoreState() and then resume(). But
>
> My issue is,
> I if the siddhiApp is shutted down, when it get started again, the method
> calls will happen in the following order.
>
> connect(), [when starting the runtime again]
> pause() and then restoreState() [when restoring the snapshot]
> and then,
> resume().
>
> I am starting the file server within connect method. For that, I need to
> give the file pointer(which is updated from snapshot) to the server, so
> that it can resume the file consuming process from the point where it
> stopped previously.
>
> Since the connect() method is called before restore() method, I cannot
> find the restored file pointer before starting the file server.
>
> Any comment on this? Should I move to the file server starting thing to
> resume() also?
>
> Thanks and regards!
>
>
> On Fri, Jul 7, 2017 at 10:25 PM, Nirmal Fernando  wrote:
>
>> @Minudika Can you elaborate a bit? What code you're referring to?
>>
>> On Fri, Jul 7, 2017 at 8:45 PM, Sriskandarajah Suhothayan 
>> wrote:
>>
>>> To my knowledge it's doing a pause() restoreState() and then resume().
>>>
>>> Am I wrong?
>>>
>>> On Fri, Jul 7, 2017 at 6:28 PM, Minudika Malshan 
>>> wrote:
>>>
 Hi,

 When restarting a siddhiAppRuntime with restoring a snapshot of the
 source, it calls the connect() method in source and then restoreState()
 method.

 Since the source is supposed to do the process using previously
 captured state, shouldn't the order be restore() and then connect() ?

 Appreciate if you can help me to clarify this.

 Thanks and regards!

 --
 *Minudika Gammanpila*
 Software Engineer - WSO2

 Email   :  minud...@wso2.com
 Mobile :  +94715659887 <071%20565%209887>
 Web :  http://wso2.com 

>>>
>>>
>>>
>>> --
>>>
>>> *S. Suhothayan*
>>> Associate Director / Architect
>>> *WSO2 Inc. *http://wso2.com
>>> * *
>>> lean . enterprise . middleware
>>>
>>>
>>> *cell: (+94) 779 756 757 <+94%2077%20975%206757> | blog:
>>> http://suhothayan.blogspot.com/ twitter:
>>> http://twitter.com/suhothayan  | linked-in:
>>> http://lk.linkedin.com/in/suhothayan *
>>>
>>
>>
>>
>> --
>>
>> Thanks & regards,
>> Nirmal
>>
>> Technical Lead, WSO2 Inc.
>> Mobile: +94715779733 <+94%2071%20577%209733>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>>
>>
>
>
> --
> *Minudika Gammanpila*
> Software Engineer - WSO2
>
> Email   :  minud...@wso2.com
> Mobile :  +94715659887
> Web :  http://wso2.com 
>
-- 

*S. Suhothayan*
Associate Director / Architect
*WSO2 Inc. *http://wso2.com
* *
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
twitter: http://twitter.com/suhothayan
 | linked-in:
http://lk.linkedin.com/in/suhothayan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Getting and resorting snapshots of a SiddhiAppRuntime

2017-07-08 Thread Nirmal Fernando
Hi Minudika,

Can't you change the pointer dynamically? Restore is there exactly for that
purpose; where whenever there's a requirement to rollback to a previous
state, restore() would get invoked.

On Sat, Jul 8, 2017 at 12:41 PM, Minudika Malshan  wrote:

> Hi,
>
> @Nirmal :
> I am trying on this siddhi-io-file. I was referring the code of
> siddi-io-kafka.
>
> @suho : Yes. It pause(), restoreState() and then resume(). But
>
> My issue is,
> I if the siddhiApp is shutted down, when it get started again, the method
> calls will happen in the following order.
>
> connect(), [when starting the runtime again]
> pause() and then restoreState() [when restoring the snapshot]
> and then,
> resume().
>
> I am starting the file server within connect method. For that, I need to
> give the file pointer(which is updated from snapshot) to the server, so
> that it can resume the file consuming process from the point where it
> stopped previously.
>
> Since the connect() method is called before restore() method, I cannot
> find the restored file pointer before starting the file server.
>
> Any comment on this? Should I move to the file server starting thing to
> resume() also?
>
> Thanks and regards!
>
>
> On Fri, Jul 7, 2017 at 10:25 PM, Nirmal Fernando  wrote:
>
>> @Minudika Can you elaborate a bit? What code you're referring to?
>>
>> On Fri, Jul 7, 2017 at 8:45 PM, Sriskandarajah Suhothayan 
>> wrote:
>>
>>> To my knowledge it's doing a pause() restoreState() and then resume().
>>>
>>> Am I wrong?
>>>
>>> On Fri, Jul 7, 2017 at 6:28 PM, Minudika Malshan 
>>> wrote:
>>>
 Hi,

 When restarting a siddhiAppRuntime with restoring a snapshot of the
 source, it calls the connect() method in source and then restoreState()
 method.

 Since the source is supposed to do the process using previously
 captured state, shouldn't the order be restore() and then connect() ?

 Appreciate if you can help me to clarify this.

 Thanks and regards!

 --
 *Minudika Gammanpila*
 Software Engineer - WSO2

 Email   :  minud...@wso2.com
 Mobile :  +94715659887 <071%20565%209887>
 Web :  http://wso2.com 

>>>
>>>
>>>
>>> --
>>>
>>> *S. Suhothayan*
>>> Associate Director / Architect
>>> *WSO2 Inc. *http://wso2.com
>>> * *
>>> lean . enterprise . middleware
>>>
>>>
>>> *cell: (+94) 779 756 757 <+94%2077%20975%206757> | blog:
>>> http://suhothayan.blogspot.com/ twitter:
>>> http://twitter.com/suhothayan  | linked-in:
>>> http://lk.linkedin.com/in/suhothayan *
>>>
>>
>>
>>
>> --
>>
>> Thanks & regards,
>> Nirmal
>>
>> Technical Lead, WSO2 Inc.
>> Mobile: +94715779733 <+94%2071%20577%209733>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>>
>>
>
>
> --
> *Minudika Gammanpila*
> Software Engineer - WSO2
>
> Email   :  minud...@wso2.com
> Mobile :  +94715659887 <+94%2071%20565%209887>
> Web :  http://wso2.com 
>



-- 

Thanks & regards,
Nirmal

Technical Lead, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSOC][DAS][DEV] Python Client on DAS 4.0

2017-07-08 Thread Sriskandarajah Suhothayan
@Ramindu

Do we have a doc that has different options that we can have for
simulation. If so please share.

On Fri, Jul 7, 2017 at 11:18 PM Madhawa Vidanapathirana <
madhawavidanapathir...@gmail.com> wrote:

> Hi,
>
> So far I've managed to implement the REST endpoints of Event Simulator
> mentioned at [1]. The code is available at repository [2].
>
> The objects passed to REST API has been mapped to Python Classes. All the
> fields mentioned in POSTMAN samples (attached) given by Ramindu has been
> added to the classes. Additionally, most of the POSTMAN samples has been
> implemented as tests in Python Code.
>
> Is their any technique I can use to identify the possible fields of any
> object that could be passed to REST API?
>
> [1] -
> https://docs.google.com/document/d/154ndex3OBoE0zNOLHatmMOvt2JHh9RJya2VdHlHOTl4/edit?usp=sharing
> [2] - https://github.com/madhawav/DASPythonClient
>
> Kind Regards,
> Madhawa
>
> --
> *Madhawa Vidanapathirana*
> Student
> Department of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka
>
> Mobile: (+94) 716874425
> Email: madhawavidanapathir...@gmail.com
> Linked-In: https://lk.linkedin.com/in/madhawa-vidanapathirana-3430b94
>
-- 

*S. Suhothayan*
Associate Director / Architect
*WSO2 Inc. *http://wso2.com
* *
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
twitter: http://twitter.com/suhothayan
 | linked-in:
http://lk.linkedin.com/in/suhothayan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Getting and resorting snapshots of a SiddhiAppRuntime

2017-07-08 Thread Minudika Malshan
Hi,

@Nirmal :
I am trying on this siddhi-io-file. I was referring the code of
siddi-io-kafka.

@suho : Yes. It pause(), restoreState() and then resume(). But

My issue is,
I if the siddhiApp is shutted down, when it get started again, the method
calls will happen in the following order.

connect(), [when starting the runtime again]
pause() and then restoreState() [when restoring the snapshot]
and then,
resume().

I am starting the file server within connect method. For that, I need to
give the file pointer(which is updated from snapshot) to the server, so
that it can resume the file consuming process from the point where it
stopped previously.

Since the connect() method is called before restore() method, I cannot find
the restored file pointer before starting the file server.

Any comment on this? Should I move to the file server starting thing to
resume() also?

Thanks and regards!


On Fri, Jul 7, 2017 at 10:25 PM, Nirmal Fernando  wrote:

> @Minudika Can you elaborate a bit? What code you're referring to?
>
> On Fri, Jul 7, 2017 at 8:45 PM, Sriskandarajah Suhothayan 
> wrote:
>
>> To my knowledge it's doing a pause() restoreState() and then resume().
>>
>> Am I wrong?
>>
>> On Fri, Jul 7, 2017 at 6:28 PM, Minudika Malshan 
>> wrote:
>>
>>> Hi,
>>>
>>> When restarting a siddhiAppRuntime with restoring a snapshot of the
>>> source, it calls the connect() method in source and then restoreState()
>>> method.
>>>
>>> Since the source is supposed to do the process using previously captured
>>> state, shouldn't the order be restore() and then connect() ?
>>>
>>> Appreciate if you can help me to clarify this.
>>>
>>> Thanks and regards!
>>>
>>> --
>>> *Minudika Gammanpila*
>>> Software Engineer - WSO2
>>>
>>> Email   :  minud...@wso2.com
>>> Mobile :  +94715659887 <071%20565%209887>
>>> Web :  http://wso2.com 
>>>
>>
>>
>>
>> --
>>
>> *S. Suhothayan*
>> Associate Director / Architect
>> *WSO2 Inc. *http://wso2.com
>> * *
>> lean . enterprise . middleware
>>
>>
>> *cell: (+94) 779 756 757 <+94%2077%20975%206757> | blog:
>> http://suhothayan.blogspot.com/ twitter:
>> http://twitter.com/suhothayan  | linked-in:
>> http://lk.linkedin.com/in/suhothayan *
>>
>
>
>
> --
>
> Thanks & regards,
> Nirmal
>
> Technical Lead, WSO2 Inc.
> Mobile: +94715779733 <+94%2071%20577%209733>
> Blog: http://nirmalfdo.blogspot.com/
>
>
>


-- 
*Minudika Gammanpila*
Software Engineer - WSO2

Email   :  minud...@wso2.com
Mobile :  +94715659887
Web :  http://wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Summarization of JSON data in DAS

2017-07-08 Thread Lahiru Madushanka
Hi Nirmal,

Documentation says arbitrary data support can be used with wso2event input
format. But in my case its "JSON".
Custom event receiver will be an option. But is there a way I can do this
without writing a custom event receiver ?

Thanks for the help.

Regards,
Lahiru

On Sat, Jul 8, 2017 at 10:02 AM, Nirmal Fernando  wrote:

> Check on arbitrary data support https://docs.wso2.com/
> display/DAS310/Input+Mapping+Types
>
> On Sat, Jul 8, 2017 at 7:48 AM, Lahiru Madushanka 
> wrote:
>
>> Hi all,
>>
>> I have a requirement where data values published to DAS are not
>> predefined (dynamic)
>> ( Ex :- cpu usage of a given laptop ) So I push them as a JSON string
>> Ex:-  "cpuinfo":{"corePercentages": [4.1, 3.1, 5.2, 7.1], "numOfCores": 4}
>> This JSON string will be changed with no of cores in the PC which pushes
>> the data.
>>
>> Is there a way I can write a summarization query in siddhiql to take
>> average of average corePercentages for a time interval. (first take avg of
>> percentage values and then average it over time )
>>
>> Thanks
>> Lahiru
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> Thanks & regards,
> Nirmal
>
> Technical Lead, WSO2 Inc.
> Mobile: +94715779733 <+94%2071%20577%209733>
> Blog: http://nirmalfdo.blogspot.com/
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev