Re: [Dev] Handling Kubernetes Specific Configurations in Puppet/Hiera

2016-04-12 Thread Anuruddha Liyanarachchi
Hi,

I think we can copy all the files found under repository/components/lib
> without specifically defining them in the Hiera file. WDYT?


This is possible if we are not copying any profile specific files. Since we
are not copying profile specific files I think we can copy all the files
found under components folder.


On Tue, Apr 12, 2016 at 12:24 PM, Imesh Gunaratne  wrote:

> +1 IMO it is better to proceed with this and later improve it as needed.
>
> One more point regarding the file list, I think we can copy all the files
> found under repository/components/lib without specifically defining them in
> the Hiera file. WDYT?
>
> Thanks
>
> On Tue, Apr 12, 2016 at 9:56 AM, Chamila De Alwis 
> wrote:
>
>> Hi Thanuja,
>>
>> +1, although I'm again concerned with the structural complexity. However
>> when weighed against other options available (having the YAML files in the
>> same folder, enabling deep merge [1], etc) this is the best option as I
>> see.
>>
>> `kubernetes/default.yaml` for WSO2 AM 1.10.0 would look something like
>> the following. This would get duplicated for each product version which is
>> a bit complex than needed and is unnecessary duplication IMO.
>>
>> [image: Inline image 1]
>>
>> [1] - [Dev] [Hiera] Deeper hash merge instead of Native hash merge?
>>
>>
>> Regards,
>> Chamila de Alwis
>> Committer and PMC Member - Apache Stratos
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>> On Mon, Apr 11, 2016 at 4:15 PM, Thanuja Uruththirakodeeswaran <
>> thanu...@wso2.com> wrote:
>>
>>>
>>>
>>> On Mon, Apr 11, 2016 at 2:06 PM, Chamila De Alwis 
>>> wrote:
>>>
 Hi Pubudu,

 That's a good idea, however, we can't exactly map `environment` with
 the `platform` concept. How about using a new level on top of the profile
 specific level mapping to `platform`?

 :hierarchy:
 - "node/%{::clientcert}"
 *-
 "wso2/%{::product_name}/%{::product_version}/%{::product_profile}-%{::platform}"*
 - "wso2/%{::product_name}/%{::product_version}/%{::product_profile}"
 - "wso2/%{::product_name}/%{::product_version}/default"
 - "osfamily/%{::osfamily}"
 - "vm_type/%{::vm_type}"
 - wso2/common
 - common

>>>
>>> +1 for introducing a new level in hierarchy to lookup for platform
>>> specific data on top of profile specific data per product.
>>>

 This will allow us to extract the platform specific data only to one
 layer up. An example would be,

 puppet-modules/hieradata/dev/wso2/wso2am/1.10.0/default-kubernetes.yaml

>>>
>>> It would be better to have spearate folders for platform specific yaml
>>> files inside each product versions like below with changing the above hiera
>>> level to: *-
>>> "wso2/%{::product_name}/%{::product_version}/%{::product_profile}/%{::platform}"*
>>>
>>> hieradata/dev/wso2/wso2as/
>>>
>>> └── 5.3.0
>>>
>>> ├── default.yaml
>>>
>>> ├── <*platform*>
>>>
>>> │   ├── default.yaml
>>>
>>> │   ├── manager.yaml
>>>
>>> │   └── worker.yaml
>>>
>>> ├── kubernetes
>>>
>>> │   ├── default.yaml
>>>
>>> │   ├── manager.yaml
>>>
>>> │   └── worker.yaml
>>>
>>> ├── manager.yaml
>>>
>>> └── worker.yaml
>>>
>>>
>>> With the above structure, configs common to all platform will be there
>>> in the products' root level hierafiles. Only the platform specific configs
>>> related to a particular profile will be there in /.yaml
>>> (ex: proxy_ports).
>>>
>>>
>>>
 WDYT?


 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Mon, Apr 11, 2016 at 1:36 PM, Pubudu Gunatilaka 
 wrote:

> Hi Isuru,
>
> Without duplicating files and adding new files, I would rather prefer
> to use the following hierarchy. For each and every different environment 
> we
> can have product profiles and include the environment specific values. For
> Kubernetes, we can include the clustering section only in manager.yaml 
> file
> which resides under environment Kubernetes. And the rest of the other
> configurations can be included in the generic file folder, i.e "
> wso2/%{::product_name}/%{::product_version}/%{::product_profile}".
>
>
> :hierarchy:
> - "node/%{::clientcert}" - - "
> wso2/%{::product_name}/%{::product_version}/%{::environment}
> /%{::product_profile}"
> - "wso2/%{::product_name}/%{::product_version}/%{::product_profile}"
> - "wso2/%{::product_name}/%{::product_version}/default"
> - "osfamily/%{::osfamily}"
> - "vm_type/%{::vm_type}"
> - wso2/common
> - common
>
>
> Thank you!
>
> On Mon, Apr 11, 2016 at 1:07 PM, Isuru Haththotuwa 
> wrote:
>
>>
>>
>> On Mon, Apr 11, 2016 at 12:47 PM, Gayan Gunarathne 
>> wrote:
>>
>>>
>>>

Re: [Dev] DAS minimum HA deployment in one node?

2016-04-12 Thread Grainier Perera
Hi Nirmal,

With the new event-processor.xml, there's no single node element. If you
put false on both HA & Distributed, it'll run as single node. If you need a
single node HA, you just have to put true to the HA config, worker-enabled,
presenter-enabled accordingly.

https://github.com/wso2/carbon-analytics-common/blob/master/features/event-processor-manager/org.wso2.carbon.event.processor.manager.core.feature/src/main/resources/conf/event-processor.xml

Regards,
Grainier

On Tue, Apr 12, 2016 at 12:07 PM, Nirmal Fernando  wrote:

> @Grainier
> https://github.com/wso2/carbon-analytics-common/commit/270cc54e51c56a200c262d364a2e439cfa15#diff-74f33ea3cfb8dcbab510606ba65d09a4
> removes the single node mode, but when single node mode element wasn't set
> to false explicitly, server doesn't start! Please fix properly.
>
> On Tue, Apr 12, 2016 at 11:09 AM, Samuel Gnaniah  wrote:
>
>> I thought we recommend two nodes for minimum deployment in production
>> environments. Normally we document the minimum recommended deployment
>> pattern for production. Should we be documenting the configurations for 1
>> node as well?
>>
>> *Samuel Gnaniah*
>> Lead Technical Writer
>>
>> WSO2 (pvt.) Ltd.
>> Colombo, Sri Lanka
>> (+94) 773131798
>>
>> On Tue, Apr 12, 2016 at 10:45 AM, Nirmal Fernando 
>> wrote:
>>
>>> Great! Can we have this in docs please?
>>>
>>> On Tue, Apr 12, 2016 at 10:42 AM, Niranda Perera 
>>> wrote:
>>>
 Yes, since both the nodes are in the same file system, there is no need
 for a symbolic link

 best

 On Tue, Apr 12, 2016 at 10:34 AM, Gihan Anuruddha 
 wrote:

> Normally what we are doing is stating one node path in both
> configuration files. Basically, this symbolic link is used to load some
> classes to runtime. Since both node are identical this won't be an issue
> IMO.
>
> Regards,
> Gihan
>
> On Tue, Apr 12, 2016 at 10:30 AM, Nirmal Fernando 
> wrote:
>
>> Hi All,
>>
>> Is it possible to setup DAS minimum HA deployment in one node? AFAIS
>> the requirement to create a symbolic link makes it impossible?
>>
>> --
>>
>> Thanks & regards,
>> Nirmal
>>
>> Team Lead - WSO2 Machine Learner
>> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
>> Mobile: +94715779733
>> Blog: http://nirmalfdo.blogspot.com/
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> W.G. Gihan Anuruddha
> Senior Software Engineer | WSO2, Inc.
> M: +94772272595
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 *Niranda Perera*
 Software Engineer, WSO2 Inc.
 Mobile: +94-71-554-8430
 Twitter: @n1r44 
 https://pythagoreanscript.wordpress.com/

>>>
>>>
>>>
>>> --
>>>
>>> Thanks & regards,
>>> Nirmal
>>>
>>> Team Lead - WSO2 Machine Learner
>>> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
>>> Mobile: +94715779733
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>
>
> --
>
> Thanks & regards,
> Nirmal
>
> Team Lead - WSO2 Machine Learner
> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
> Mobile: +94715779733
> Blog: http://nirmalfdo.blogspot.com/
>
>
>


-- 
Grainier Perera
Software Engineer
Mobile : +94716122384
WSO2 Inc. | http://wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Handling Kubernetes Specific Configurations in Puppet/Hiera

2016-04-12 Thread Vishanth Balasubramaniam
Hi,

One more point regarding the file list, I think we can copy all the files
> found under repository/components/lib without specifically defining them in
> the Hiera file. WDYT?


Totally +1, it will make it much easier for the user.

Regards,
Vishanth


On Tue, Apr 12, 2016 at 12:24 PM, Imesh Gunaratne  wrote:

> +1 IMO it is better to proceed with this and later improve it as needed.
>
> One more point regarding the file list, I think we can copy all the files
> found under repository/components/lib without specifically defining them in
> the Hiera file. WDYT?
>
> Thanks
>
> On Tue, Apr 12, 2016 at 9:56 AM, Chamila De Alwis 
> wrote:
>
>> Hi Thanuja,
>>
>> +1, although I'm again concerned with the structural complexity. However
>> when weighed against other options available (having the YAML files in the
>> same folder, enabling deep merge [1], etc) this is the best option as I
>> see.
>>
>> `kubernetes/default.yaml` for WSO2 AM 1.10.0 would look something like
>> the following. This would get duplicated for each product version which is
>> a bit complex than needed and is unnecessary duplication IMO.
>>
>> [image: Inline image 1]
>>
>> [1] - [Dev] [Hiera] Deeper hash merge instead of Native hash merge?
>>
>>
>> Regards,
>> Chamila de Alwis
>> Committer and PMC Member - Apache Stratos
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>> On Mon, Apr 11, 2016 at 4:15 PM, Thanuja Uruththirakodeeswaran <
>> thanu...@wso2.com> wrote:
>>
>>>
>>>
>>> On Mon, Apr 11, 2016 at 2:06 PM, Chamila De Alwis 
>>> wrote:
>>>
 Hi Pubudu,

 That's a good idea, however, we can't exactly map `environment` with
 the `platform` concept. How about using a new level on top of the profile
 specific level mapping to `platform`?

 :hierarchy:
 - "node/%{::clientcert}"
 *-
 "wso2/%{::product_name}/%{::product_version}/%{::product_profile}-%{::platform}"*
 - "wso2/%{::product_name}/%{::product_version}/%{::product_profile}"
 - "wso2/%{::product_name}/%{::product_version}/default"
 - "osfamily/%{::osfamily}"
 - "vm_type/%{::vm_type}"
 - wso2/common
 - common

>>>
>>> +1 for introducing a new level in hierarchy to lookup for platform
>>> specific data on top of profile specific data per product.
>>>

 This will allow us to extract the platform specific data only to one
 layer up. An example would be,

 puppet-modules/hieradata/dev/wso2/wso2am/1.10.0/default-kubernetes.yaml

>>>
>>> It would be better to have spearate folders for platform specific yaml
>>> files inside each product versions like below with changing the above hiera
>>> level to: *-
>>> "wso2/%{::product_name}/%{::product_version}/%{::product_profile}/%{::platform}"*
>>>
>>> hieradata/dev/wso2/wso2as/
>>>
>>> └── 5.3.0
>>>
>>> ├── default.yaml
>>>
>>> ├── <*platform*>
>>>
>>> │   ├── default.yaml
>>>
>>> │   ├── manager.yaml
>>>
>>> │   └── worker.yaml
>>>
>>> ├── kubernetes
>>>
>>> │   ├── default.yaml
>>>
>>> │   ├── manager.yaml
>>>
>>> │   └── worker.yaml
>>>
>>> ├── manager.yaml
>>>
>>> └── worker.yaml
>>>
>>>
>>> With the above structure, configs common to all platform will be there
>>> in the products' root level hierafiles. Only the platform specific configs
>>> related to a particular profile will be there in /.yaml
>>> (ex: proxy_ports).
>>>
>>>
>>>
 WDYT?


 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Mon, Apr 11, 2016 at 1:36 PM, Pubudu Gunatilaka 
 wrote:

> Hi Isuru,
>
> Without duplicating files and adding new files, I would rather prefer
> to use the following hierarchy. For each and every different environment 
> we
> can have product profiles and include the environment specific values. For
> Kubernetes, we can include the clustering section only in manager.yaml 
> file
> which resides under environment Kubernetes. And the rest of the other
> configurations can be included in the generic file folder, i.e "
> wso2/%{::product_name}/%{::product_version}/%{::product_profile}".
>
>
> :hierarchy:
> - "node/%{::clientcert}" - - "
> wso2/%{::product_name}/%{::product_version}/%{::environment}
> /%{::product_profile}"
> - "wso2/%{::product_name}/%{::product_version}/%{::product_profile}"
> - "wso2/%{::product_name}/%{::product_version}/default"
> - "osfamily/%{::osfamily}"
> - "vm_type/%{::vm_type}"
> - wso2/common
> - common
>
>
> Thank you!
>
> On Mon, Apr 11, 2016 at 1:07 PM, Isuru Haththotuwa 
> wrote:
>
>>
>>
>> On Mon, Apr 11, 2016 at 12:47 PM, Gayan Gunarathne 
>> wrote:
>>
>>>
>>>
>>> On Mon, Apr 11, 2016 at 12:39 PM, Lakmal Warusawithana <

[Dev] SnapshotService info logs to debug mode

2016-04-12 Thread Nirmal Fernando
Hi CEP team,

Shall we move these info logs to debug level?

TID: [-1] [] [2016-04-12 08:24:47,094]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,096]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
{org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
serialization started ...
{org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
{org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
serialization started ...
{org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
{org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
serialization started ...
{org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
{org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
serialization started ...
{org.wso2.siddhi.core.util.snapshot.SnapshotService}

TID: [-1] [] [2016-04-12 08:24:47,103]  INFO
{org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, 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] SnapshotService info logs to debug mode

2016-04-12 Thread Sriskandarajah Suhothayan
I'm wondering why there are lots of Snapshot taken at with close time gap.

On Tue, Apr 12, 2016 at 1:56 PM, Nirmal Fernando  wrote:

> Hi CEP team,
>
> Shall we move these info logs to debug level?
>
> TID: [-1] [] [2016-04-12 08:24:47,094]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,096]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization started ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization started ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization started ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization started ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,103]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
> --
>
> Thanks & regards,
> Nirmal
>
> Team Lead - WSO2 Machine Learner
> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
> Mobile: +94715779733
> Blog: http://nirmalfdo.blogspot.com/
>
>
>


-- 

*S. Suhothayan*
Technical Lead & Team Lead of WSO2 Complex Event Processor
*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] SnapshotService info logs to debug mode

2016-04-12 Thread Nirmal Fernando
Yes me too. There were more logs. Basically, once the other node joined,
these kind of logs got printed around 3/4 times.

On Tue, Apr 12, 2016 at 2:18 PM, Sriskandarajah Suhothayan 
wrote:

> I'm wondering why there are lots of Snapshot taken at with close time gap.
>
> On Tue, Apr 12, 2016 at 1:56 PM, Nirmal Fernando  wrote:
>
>> Hi CEP team,
>>
>> Shall we move these info logs to debug level?
>>
>> TID: [-1] [] [2016-04-12 08:24:47,094]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,096]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
>> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>> serialization started ...
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
>> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>> serialization started ...
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
>> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>> serialization started ...
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
>> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>> serialization started ...
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>
>> TID: [-1] [] [2016-04-12 08:24:47,103]  INFO
>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>> --
>>
>> Thanks & regards,
>> Nirmal
>>
>> Team Lead - WSO2 Machine Learner
>> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
>> Mobile: +94715779733
>> Blog: http://nirmalfdo.blogspot.com/
>>
>>
>>
>
>
> --
>
> *S. Suhothayan*
> Technical Lead & Team Lead of WSO2 Complex Event Processor
> *WSO2 Inc. *http://wso2.com
> * *
> lean . enterprise . middleware
>
>
> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
> http://suhothayan.blogspot.com/ twitter:
> http://twitter.com/suhothayan  | linked-in:
> http://lk.linkedin.com/in/suhothayan *
>



-- 

Thanks & regards,
Nirmal

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


[Dev] Representing Data Types in JSON schema when objects hold values

2016-04-12 Thread Sohani Weerasinghe
Hi All,

Please find below details on the support provided in defining the data
types for objects( when holding values) in JSON schema.

Problem:

When an object array or a primitive array or an object  holds a value,
there should be a way to define the data type of that value in the schema.

http://www.w3.org/TR/html4/";>
sample
*071771* <071771>01
*0112655655* <0112655655>01


Solution:

We have introduced an object called "value" as below in defining the data
type

"value":{
  "type": "number"
 }

 1. An object array with attributes, properties and values

http://www.w3.org/TR/html4/";>
   sample
   
  0112655655
  01
   
   
  0112655655
  01
   


{
   "$schema":"http://json-schema.org/draft-04/schema#";,
   "title":"person",
   "id":"http://wso2jsonschema.org";,
   "type":"object",
   "properties":{
  "firstName":{
 "id":"http://wso2jsonschema.org/firstName";,
 "type":"string"
  },
  "phone":{
 "id":"http://wso2jsonschema.org/phone";,
 "type":"array",
 "items":[
{
   "id":"http://wso2jsonschema.org/phone/0";,
   "type":"object",
  * "value":{  *
*  "type":"number"*
*   },*
   "properties":{
  "ext":{
 "id":"http://wso2jsonschema.org/phone/0/ext";,
 "type":"number"
  }
   },
   "attributes":{
  "primary":{
 "id":"http://wso2jsonschema.org/phone/0/primary";,
 "type":"boolean"
  }
   }
}
 ]
  }
   }
}

2. Primitive array with values


   sample
   0112655655
   0112655656


{
   "$schema":"http://json-schema.org/draft-04/schema#";,
   "title":"person",
   "id":"http://wso2jsonschema.org";,
   "type":"object",
   "properties":{
  "firstName":{
 "id":"http://wso2jsonschema.org/firstName";,
 "type":"string"
  },
  "phone":{
 "id":"http://wso2jsonschema.org/phone";,
 "type":"array",
 "items":[
{
 *  "id":"http://wso2jsonschema.org/phone/phone
",*
*   "type":"number"*
}
 ]
  }
   }
}

3. Object with values


sample
071655339


{
   "$schema":"http://json-schema.org/draft-04/schema#";,
   "title":"person",
   "id":"http://wso2jsonschema.org";,
   "type":"object",
   "properties":{
  "firstName":{
 "id":"http://wso2jsonschema.org/firstName";,
 "type":"string"
  },
  "phone":{
 "id":"http://wso2jsonschema.org/phone";,
 "type":"object",
* "value":{  *
*"type":"number"*
* },*
 "attributes":{
"primary":{
   "id":"http://wso2jsonschema.org/primary";,
   "type":"boolean"
}
 }
  }
   }

Thanks,
Sohani
Sohani Weerasinghe
Software Engineer
WSO2, Inc: http://wso2.com

Mobile  : +94 716439774
Blog :http://christinetechtips.blogspot.com/
Twitter  : https://twitter.com/sohanichristine
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [APIM-Analytics] Error while running spark scripts in HA mode

2016-04-12 Thread Nirmal Fernando
Hi All,

Any idea why below exception occurs? We have several spark scripts at APIM
analytics pack and we see this only in HA mode.

Driver stacktrace: {org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter}

org.apache.spark.SparkException: Job aborted due to stage failure: Task 0
in stage 25696.0 failed 4 times, most recent failure: Lost task 0.3 in
stage 25696.0 (TID 13729, 192.168.57.162): java.lang.ClassCastException:
cannot assign instance of
scala.collection.immutable.HashMap$SerializationProxy to field
org.apache.spark.sql.execution.Aggregate.org$apache$spark$sql$execution$Aggregate$$resultMap
of type scala.collection.immutable.Map in instance of
org.apache.spark.sql.execution.Aggregate

at
java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2083)

at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1261)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1996)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)

at scala.collection.immutable.$colon$colon.readObject(List.scala:362)

at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)

at
org.apache.spark.serializer.JavaDeserializationStream.readObject(JavaSerializer.scala:69)

at
org.apache.spark.serializer.JavaSerializerInstance.deserialize(JavaSerializer.scala:95)

at
org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:61)

at
org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:41)

at org.apache.spark.scheduler.Task.run(Task.scala:70)

at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:213)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:745)


Driver stacktrace:

at org.apache.spark.scheduler.DAGScheduler.org
$apache$spark$scheduler$DAGScheduler$$failJobAndIndependentStages(DAGScheduler.scala:1276)

at
org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1267)

at
org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(

[Dev] [VOTE] Release WSO2 Governance Registry 5.2.0 RC 1

2016-04-12 Thread Thushara Ranawaka
Hi Devs,

WSO2 Governance Registry 5.2.0 RC1 Release Vote.

This release fixes the following issues:
https://wso2.org/jira/browse/REGISTRY-3561?filter=13023
Please download, test and vote. Please refer the release verification guide
for detailed information on verifying this release.

Source & binary distribution files:
https://svn.wso2.org/repos/wso2/scratch/G-Reg/5.2.0/rc1/

Maven staging repo:
https://maven.wso2.org/nexus/content/repositories/orgwso2greg-1001

The tag to be voted upon:
https://github.com/wso2/product-greg/tree/v5.2.0-rc1

[+] Stable - go ahead and release
[-]  Broken - do not release (please explain why)

Thanks and Regards
G-Reg team

-- 
Thanks,
Thushara Kasun Ranawaka
Software Engineer
WSO2 Inc.; 
lean.enterprise.middleware
Mobile : *+94 (0) 773438949*
*thusha...@wso2.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Representing Data Types in JSON schema when objects hold values

2016-04-12 Thread Susinda Perera
Implemented above scenarios (also mentioned in [1]) in schema generation.

[1] -
https://docs.google.com/a/wso2.com/document/d/1s820PSZlhRYq8kGc9GFwJaMcpQX8X4jz9sFvo1bK6rI/edit?usp=sharing


On Tue, Apr 12, 2016 at 3:06 PM, Sohani Weerasinghe  wrote:

> Hi All,
>
> Please find below details on the support provided in defining the data
> types for objects( when holding values) in JSON schema.
>
> Problem:
>
> When an object array or a primitive array or an object  holds a value,
> there should be a way to define the data type of that value in the schema.
>
> http://www.w3.org/TR/html4/";>
> sample
> *071771* <071771>
> 01
> *0112655655* <0112655655>01
> 
>
> Solution:
>
> We have introduced an object called "value" as below in defining the data
> type
>
> "value":{
>   "type": "number"
>  }
>
>  1. An object array with attributes, properties and values
>
> http://www.w3.org/TR/html4/";>
>sample
>
>   0112655655
>   01
>
>
>   0112655655
>   01
>
> 
>
> {
>"$schema":"http://json-schema.org/draft-04/schema#";,
>"title":"person",
>"id":"http://wso2jsonschema.org";,
>"type":"object",
>"properties":{
>   "firstName":{
>  "id":"http://wso2jsonschema.org/firstName";,
>  "type":"string"
>   },
>   "phone":{
>  "id":"http://wso2jsonschema.org/phone";,
>  "type":"array",
>  "items":[
> {
>"id":"http://wso2jsonschema.org/phone/0";,
>"type":"object",
>   * "value":{  *
> *  "type":"number"*
> *   },*
>"properties":{
>   "ext":{
>  "id":"http://wso2jsonschema.org/phone/0/ext";,
>  "type":"number"
>   }
>},
>"attributes":{
>   "primary":{
>  "id":"http://wso2jsonschema.org/phone/0/primary";,
>  "type":"boolean"
>   }
>}
> }
>  ]
>   }
>}
> }
>
> 2. Primitive array with values
>
> 
>sample
>0112655655
>0112655656
> 
>
> {
>"$schema":"http://json-schema.org/draft-04/schema#";,
>"title":"person",
>"id":"http://wso2jsonschema.org";,
>"type":"object",
>"properties":{
>   "firstName":{
>  "id":"http://wso2jsonschema.org/firstName";,
>  "type":"string"
>   },
>   "phone":{
>  "id":"http://wso2jsonschema.org/phone";,
>  "type":"array",
>  "items":[
> {
>  *  "id":"http://wso2jsonschema.org/phone/phone
> ",*
> *   "type":"number"*
> }
>  ]
>   }
>}
> }
>
> 3. Object with values
>
> 
> sample
> 071655339
> 
>
> {
>"$schema":"http://json-schema.org/draft-04/schema#";,
>"title":"person",
>"id":"http://wso2jsonschema.org";,
>"type":"object",
>"properties":{
>   "firstName":{
>  "id":"http://wso2jsonschema.org/firstName";,
>  "type":"string"
>   },
>   "phone":{
>  "id":"http://wso2jsonschema.org/phone";,
>  "type":"object",
> * "value":{  *
> *"type":"number"*
> * },*
>  "attributes":{
> "primary":{
>"id":"http://wso2jsonschema.org/primary";,
>"type":"boolean"
> }
>  }
>   }
>}
>
> Thanks,
> Sohani
> Sohani Weerasinghe
> Software Engineer
> WSO2, Inc: http://wso2.com
>
> Mobile  : +94 716439774
> Blog :http://christinetechtips.blogspot.com/
> Twitter  : https://twitter.com/sohanichristine
>



-- 
*Susinda Perera*
Software Engineer
B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
Mobile:(+94)716049075
Blog: susinda.blogspot.com
WSO2 Inc. http://wso2.com/
Tel : 94 11 214 5345 Fax :94 11 2145300
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issue in CEP time window

2016-04-12 Thread Sriskandarajah Suhothayan
Hi Mohamed

Were you able to solve the issue. with the latest pack?

Suho

On Sun, Apr 3, 2016 at 7:35 AM, Damith Wickramasinghe 
wrote:

> Hi Mohamed,
>
> can you tel us how did you reproduced it? In my case I had only event sent
> to time window stream but in real scenario there will be many events and
> then this issue won't occur. Can you please try that way.
>
> Regards,
> Damith.
>
> On Sat, Apr 2, 2016 at 2:48 PM, Damith Wickramasinghe 
> wrote:
>
>> Hi Mohamed,
>>
>> I was able to reproduce it. We'll look into this. At the Mean time can
>> you please tell us the CEP version you are using.
>>
>> Reagrds,
>> Damith.
>>
>> On Sat, Apr 2, 2016 at 2:15 PM, Mohamed Rilfi 
>> wrote:
>>
>>> Dear All
>>>
>>> *In the Following Execution Plan the event staying forever in the one
>>> min time window "ins#window.time(1 min)" *
>>>
>>> /* Enter a unique ExecutionPlan */
>>> @Plan:name('R_H_Match')
>>>
>>> /* Enter a unique description for ExecutionPlan */
>>> -- @Plan:description('ExecutionPlan')
>>>
>>> /* define streams/tables and write queries here ... */
>>>
>>> @Import('RelatedStream:1.0.0')
>>> define stream rs (ID string, product string, uc1 string, state string,
>>> brand string, model string, type string);
>>>
>>> @Import('InputStream:1.0.0')
>>> define stream ins (ID string, product string, uc1 string, state string,
>>> brand string, model string, type string, tweet string);
>>>
>>>
>>>
>>> @Export('matchingStream:1.0.0')
>>> define stream ms (rID string, rproduct string, ruc1 string, rstate
>>> string, rbrand string, rmodel string, rtype string, hID string, hproduct
>>> string, huc1 string, hstate string, hbrand string, hmodel string, htype
>>> string);
>>>
>>> from ins#window.time(1 min) as R
>>>   join rs#window.length(1) as H
>>>   on R.product == H.product and R.brand==H.brand and R.type==H.type and
>>> R.state!=H.state
>>> select R.ID as rID, R.product as rproduct , R.uc1 as ruc1 , R.state as
>>> rstate, R.brand as rbrand , R.model as rmodel , R.type as rtype ,H.ID
>>> as hID , H.product as hproduct , H.uc1 as huc1 , H.state as hstate ,
>>> H.brand as hbrand, H.model as hmodel , H.type as htype
>>> insert into ms;
>>>
>>>
>>>
>>>
>>> Thanks & Best Regards
>>>
>>> --
>>>
>>> *M.R.M.Rilfi
>>> M.Sc in Computer Science (Reading) Moratuwa
>>> B.Sc Sp. Computer Science
>>> Dept. Computer Science & Engineering,University of Moratuwa
>>> ri...@live.com  , ri...@cse.mrt.ac.lk 
>>> +94776284627 <%2B94776284627> *
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Software Engineer
>> WSO2 Inc.; http://wso2.com
>> 
>> lean.enterprise.middleware
>>
>> mobile: *+94728671315 <%2B94728671315>*
>>
>>
>
>
> --
> Software Engineer
> WSO2 Inc.; http://wso2.com
> 
> lean.enterprise.middleware
>
> mobile: *+94728671315 <%2B94728671315>*
>
>


-- 

*S. Suhothayan*
Technical Lead & Team Lead of WSO2 Complex Event Processor
*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


[Dev] Wrong Test method name

2016-04-12 Thread Aparna Karunarathna
Hi All,

While doing the API Manager test case mapping, observed $subject has used.
Both method names should be changed to *testAddDocumentToAnAPISupportUrl()
and **testAddDocumentToAnAPIPublicUrl()*

class: 
APIM623AddDocumentationToAnAPIWithDocTypePublicForumThroughPublisherRestAPITestCase.java

*@Test(groups = {"wso2.am "}, description = "Add
Documentation To An API With Type support forum And" + " Source Url through
the publisher rest API ")*

*public void testAddDocumentToAnAPISupportInline() throws Exception {*


class
: 
APIM625AddDocumentationToAnAPIWithDocTypeSupportForumThroughPublisherRestAPITestCase.java


*@Test(groups = {"wso2.am "}, description = "Add
Documentation To An API With Type " +"public forum And" + " Source Url
through the publisher rest API ")*

*public void testAddDocumentToAnAPIPublicInline() **throws Exception {*

It would be good to update the Test method names.

-- 
*Regards,*

*Aparna Karunarathna.*


*Associate Technical Lead - QAWSO2 Inc.Mobile: 0714002533*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [IOT] How to start building device types in IoTS using Developer Studio

2016-04-12 Thread 云展智创
Hi all,

Could you give me some advices on how to start building iot device types in 
IoTS using Developer Studio? 

I have forked the product-iot project, cloned into my desktop. After running 
mvn eclipse:eclipse in product-iot, I can only find 3 projects 
(cdmf-devicetype-archetype, mdm-android-agent-archetype, 
org.wso.iot.admin.styles) when I import projects in product-iot folder. Is that 
right? How can I import the whole iot project and start creating my blocks and 
building them with Maven? For example, to create and build a new device type 
with cdmf-devicetype-archetype in Developer Studio. 

And how can I design the ui of the new iot device type plugin with Developer 
Studio? Is that WYSIWYG design interface with Developer Studio? 

Thanks.

--
Zhanwen Zhou (Jason)

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


Re: [Dev] Issue in CEP time window

2016-04-12 Thread Damith Wickramasinghe
Hi Suho,

Mohamed is using WSO2 DAS 3.0.0 which is using siddhi 3.0.3. I could see
the same issue in latest siddhi as well for a one event sent to time
window. But when there are more than one event in time window then events
gets expired as expected. Since there wont be just one event in a window
this issue won't occur in real scenarios. Are we fixing this ?

Regards,
Damith.

On Tue, Apr 12, 2016 at 4:59 PM, Sriskandarajah Suhothayan 
wrote:

> Hi Mohamed
>
> Were you able to solve the issue. with the latest pack?
>
> Suho
>
> On Sun, Apr 3, 2016 at 7:35 AM, Damith Wickramasinghe 
> wrote:
>
>> Hi Mohamed,
>>
>> can you tel us how did you reproduced it? In my case I had only event
>> sent to time window stream but in real scenario there will be many events
>> and then this issue won't occur. Can you please try that way.
>>
>> Regards,
>> Damith.
>>
>> On Sat, Apr 2, 2016 at 2:48 PM, Damith Wickramasinghe 
>> wrote:
>>
>>> Hi Mohamed,
>>>
>>> I was able to reproduce it. We'll look into this. At the Mean time can
>>> you please tell us the CEP version you are using.
>>>
>>> Reagrds,
>>> Damith.
>>>
>>> On Sat, Apr 2, 2016 at 2:15 PM, Mohamed Rilfi 
>>> wrote:
>>>
 Dear All

 *In the Following Execution Plan the event staying forever in the one
 min time window "ins#window.time(1 min)" *

 /* Enter a unique ExecutionPlan */
 @Plan:name('R_H_Match')

 /* Enter a unique description for ExecutionPlan */
 -- @Plan:description('ExecutionPlan')

 /* define streams/tables and write queries here ... */

 @Import('RelatedStream:1.0.0')
 define stream rs (ID string, product string, uc1 string, state string,
 brand string, model string, type string);

 @Import('InputStream:1.0.0')
 define stream ins (ID string, product string, uc1 string, state string,
 brand string, model string, type string, tweet string);



 @Export('matchingStream:1.0.0')
 define stream ms (rID string, rproduct string, ruc1 string, rstate
 string, rbrand string, rmodel string, rtype string, hID string, hproduct
 string, huc1 string, hstate string, hbrand string, hmodel string, htype
 string);

 from ins#window.time(1 min) as R
   join rs#window.length(1) as H
   on R.product == H.product and R.brand==H.brand and R.type==H.type and
 R.state!=H.state
 select R.ID as rID, R.product as rproduct , R.uc1 as ruc1 , R.state as
 rstate, R.brand as rbrand , R.model as rmodel , R.type as rtype ,H.ID
 as hID , H.product as hproduct , H.uc1 as huc1 , H.state as hstate ,
 H.brand as hbrand, H.model as hmodel , H.type as htype
 insert into ms;




 Thanks & Best Regards

 --

 *M.R.M.Rilfi
 M.Sc in Computer Science (Reading) Moratuwa
 B.Sc Sp. Computer Science
 Dept. Computer Science & Engineering,University of Moratuwa
 ri...@live.com  , ri...@cse.mrt.ac.lk 
 +94776284627 <%2B94776284627> *


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


>>>
>>>
>>> --
>>> Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> 
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94728671315 <%2B94728671315>*
>>>
>>>
>>
>>
>> --
>> Software Engineer
>> WSO2 Inc.; http://wso2.com
>> 
>> lean.enterprise.middleware
>>
>> mobile: *+94728671315 <%2B94728671315>*
>>
>>
>
>
> --
>
> *S. Suhothayan*
> Technical Lead & Team Lead of WSO2 Complex Event Processor
> *WSO2 Inc. *http://wso2.com
> * *
> lean . enterprise . middleware
>
>
> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
> http://suhothayan.blogspot.com/ twitter:
> http://twitter.com/suhothayan  | linked-in:
> http://lk.linkedin.com/in/suhothayan *
>



-- 
Software Engineer
WSO2 Inc.; http://wso2.com

lean.enterprise.middleware

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


Re: [Dev] [App Cloud] Search By Tag feature in App Cloud

2016-04-12 Thread Kasun De Silva
+1 for using the same search box in the app listing page.

And +1 for Danushka's idea to use below mechanism.

*tag::*
*tag:*

Better if we can provide some tool-tips in app listing page to users on how
they can search through tags.

Thanks,
Kasun

On Mon, Apr 11, 2016 at 11:31 PM, Danushka Fernando 
wrote:

> I just checked the EC2 behavior. Since we have similar concept I would
> vote for that.
> Which is tag::
> If we want to search the instances have that tag with particular key only
> it would be like
> tag:
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
> On Tue, Apr 12, 2016 at 8:27 AM, Nishadi Kirielle 
> wrote:
>
>> Hi All,
>> Currently, I'm focusing on implementing the functionality to search
>> applications by the provided tag in application listing index page. In
>> implementing that functionality I'm planning to use the same search box
>> used to search applications by their name to be used but the search phrase
>> will begin with the 'tag' keyword. For example;
>>  'tag:tomcat'
>>
>> Really appreciate your suggestions in proceeding with this.
>>
>> Thanks
>> --
>> *Nishadi Kirielle*
>> *Software Engineering Intern*
>> Mobile : +94 (0) 714722148
>> Blog : http://nishadikirielle.blogspot.com/
>> nish...@wso2.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Kasun de Silva*
Software Engineer | *WSO2 Inc.*; http://wso2.com
lean.enterprise.middleware

email   : kas...@wso2.com
mobile : +94 77 794 4260
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Add some additional information to "Tier Availability" section in API publisher.

2016-04-12 Thread Harsha Kumara
Yeah Subscription Tiers make more sense. Also it would be ideal if we can
add note or tool tip on it. Created JIRA at [1]

[1] - https://wso2.org/jira/browse/APIMANAGER-4630

On Mon, Apr 11, 2016 at 1:23 PM, Nuwan Dias  wrote:

> +1. A label like "Subscription Tiers" should do IMO.
>
> Thanks,
> NuwanD.
>
> On Mon, Apr 11, 2016 at 12:38 PM, Sanjeewa Malalgoda 
> wrote:
>
>>
>> Hi Team,
>> In API edit wizard's manage window we have label called "Tier
>> Availability". But i think its better if we can change this to "Tiers
>> Available for subscribe API", "Select tiers for subscribe API". We need to
>> tell user "The tiers you select here are the ones available for subscriber
>> to subscribe this API". WDYT?
>>
>>
>> ​
>> Thanks,
>> sanjeewa.
>> --
>>
>> *Sanjeewa Malalgoda*
>> WSO2 Inc.
>> Mobile : +94713068779
>>
>> blog
>> :http://sanjeewamalalgoda.blogspot.com/
>> 
>>
>>
>>
>
>
> --
> Nuwan Dias
>
> Technical Lead - WSO2, Inc. http://wso2.com
> email : nuw...@wso2.com
> Phone : +94 777 775 729
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Harsha Kumara
Software Engineer, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IOT] How to start building device types in IoTS using Developer Studio

2016-04-12 Thread Geesara Prathap
Hi Jason,

I have forked the product-iot project, cloned into my desktop. After
running mvn eclipse:eclipse in product-iot, I can only find 3 projects
(cdmf-devicetype-archetype, mdm-android-agent-archetype,
org.wso.iot.admin.styles) when I import projects in product-iot folder. Is
that right?

This is not the right approach you need to follow. First of all, you don't
need to download product-iots. What you need is download IoTS pack from here
[1] . Then
there are some sample device type plugins which are in the sample folder
you can try out. I hope you have tried how to create new device type plugin
using maven archetype by now.

How can I import the whole iot project and start creating my blocks and
building them with Maven?

So open any samples using wso2 developer studio or any other IDE which
support maven as a maven project. In M3, some of the dependencies are
getting as system dependencies. So don't move or relocated sample device
types plugins from sample folder. So once you created device type plugin
from maven archetype you can do any changes to each component as you
required. But device-deployer.xml can't use to redeploy your device type
plugin. This feature wasn't included in M3 pack. What you can do is as an
example let's say you have done some changes on  controller or manager web
app. Then you have to copy and paste each web app into
/repository/deployment/server/webapps. Listed below each component where to
copy once done some changes on it.

controller/manager web app -  /repository/deployment/server/webapps
plugin -/repository/components/dropins
(need to restart server to apply new changes)
analytics carbonapps - /repository/deployment/server/carbonapps
UI units -
 /repository/deployment/server/jaggeryapps/devicemgt/app/units


Note: this structure is applied to M3 and all paths are taken relative to
IoTS_HOME.
This[2]
explains
each and every component separately how to write your own device type
plugin.


For example, to create and build a new device type with
cdmf-devicetype-archetype in Developer Studio.

This feature will be available in next release of IoTS.


1.https://github.com/wso2/product-iots/releases/tag/IoTS-1.0.0-M3
2.https://docs.wso2.com/display/IoTS100/Writing+Your+Own+Device+Connector

Thanks,
Geesara


On Tue, Apr 12, 2016 at 6:49 PM, 云展智创  wrote:

> Hi all,
>
> Could you give me some advices on how to start building iot device types
> in IoTS using Developer Studio?
>
> I have forked the product-iot project, cloned into my desktop. After
> running mvn eclipse:eclipse in product-iot, I can only find 3 projects
> (cdmf-devicetype-archetype, mdm-android-agent-archetype,
> org.wso.iot.admin.styles) when I import projects in product-iot folder. Is
> that right? How can I import the whole iot project and start creating my
> blocks and building them with Maven? For example, to create and build a new
> device type with cdmf-devicetype-archetype in Developer Studio.
>
> And how can I design the ui of the new iot device type plugin with
> Developer Studio? Is that WYSIWYG design interface with Developer Studio?
>
> Thanks.
>
> --
> Zhanwen Zhou (Jason)
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
Geesara Prathap Kulathunga
Software Engineer
WSO2 Inc; http://wso2.com
Mobile : +940772684174
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [App Cloud] Custom Applications on AppCloud

2016-04-12 Thread Kasun De Silva
Hi Nishadi,

As for now this feature is expected to be exposed only to internal users by
> updating the configuration file.


How did we do this? what is the config file used ?

Can you provide some example how can we use this feature. Say I have an
image "kasun/af_tomcat" how can I deploy this in AppCloud using this
feature?

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


Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-04-12 Thread Kishanthan Thangarajah
Can you create a jira for this, so that will track and add it to
kernel/platform?

On Thu, Apr 7, 2016 at 5:37 PM, Isuru Perera  wrote:

> Hi Carbon team,
>
> When will this feature be implemented in Carbon? As I understand, most of
> the products need this feature.
>
> Thanks!
>
> On Tue, Mar 29, 2016 at 11:51 AM, Asitha Nanayakkara 
> wrote:
>
>> +1 for having this as a common feature. MB will also be using this
>> feature to create the database schema based on the database vendor.
>>
>> On Tue, Mar 29, 2016 at 11:09 AM, Isuru Perera  wrote:
>>
>>> Hi Aruna,
>>>
>>> I think this feature will be important for other products as most of the
>>> products will eventually need to create the database schema based on the
>>> database vendor.
>>>
>>> I hope MB team will also need this feature soon and it would be good if
>>> this feature can be supported in next platform release.
>>>
>>> Thanks!
>>>
>>> On Fri, Mar 25, 2016 at 2:03 PM, Aruna Karunarathna 
>>> wrote:
>>>


 On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:

> Hi,
>
> In Carbon 4.x.x, we extend [1]
> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the 
> same
> in Carbon 5?
>

 Hi Isuru,

 There is no such feature planned or available ATM for hamming platform
 release.
 Regards,
 Aruna

>
> Thanks!
>
> [1]
> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
> [2]
> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --

 *Aruna Sujith Karunarathna *
 WSO2, Inc | lean. enterprise. middleware.
 #20, Palm Grove, Colombo 03, Sri Lanka
 Mobile: +94 71 9040362 | Work: +94 112145345
 Email: ar...@wso2.com | Web: www.wso2.com


>>>
>>>
>>>
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> 
>>>
>>
>>
>>
>> --
>> *Asitha Nanayakkara*
>> Software Engineer
>> WSO2, Inc. http://wso2.com/
>> Mob: +94 77 853 0682
>>
>>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 
*Kishanthan Thangarajah*
Associate Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com *
Twitter - *http://twitter.com/kishanthan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Purpose of methods starting with "jsFunction" with respect to Jaggery Application

2016-04-12 Thread Megala Uthayakumar
Hi all,

I am trying to access a method in java class from a simple jaggery
application. In the repository jaggery, there are many methods that starts
with jsFunction [1]. They are quite different from the normal java methods
with regards to jaggery application. Could someone help me in understanding
how those methods can be called effectively from a jaggery application ?

[1]
https://github.com/wso2/jaggery/blob/master/components/hostobjects/org.jaggeryjs.hostobjects.web/src/main/java/org/jaggeryjs/hostobjects/web/RequestHostObject.java


Thanks.

Regards,
Megala

Megala Uthayakumar

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


Re: [Dev] Issue in CEP time window

2016-04-12 Thread Sriskandarajah Suhothayan
Hi Damith

In that case we have to fix it right, else it will not be consistent.

Regards
Suho

On Tue, Apr 12, 2016 at 8:03 PM, Damith Wickramasinghe 
wrote:

> Hi Suho,
>
> Mohamed is using WSO2 DAS 3.0.0 which is using siddhi 3.0.3. I could see
> the same issue in latest siddhi as well for a one event sent to time
> window. But when there are more than one event in time window then events
> gets expired as expected. Since there wont be just one event in a window
> this issue won't occur in real scenarios. Are we fixing this ?
>
> Regards,
> Damith.
>
> On Tue, Apr 12, 2016 at 4:59 PM, Sriskandarajah Suhothayan 
> wrote:
>
>> Hi Mohamed
>>
>> Were you able to solve the issue. with the latest pack?
>>
>> Suho
>>
>> On Sun, Apr 3, 2016 at 7:35 AM, Damith Wickramasinghe 
>> wrote:
>>
>>> Hi Mohamed,
>>>
>>> can you tel us how did you reproduced it? In my case I had only event
>>> sent to time window stream but in real scenario there will be many events
>>> and then this issue won't occur. Can you please try that way.
>>>
>>> Regards,
>>> Damith.
>>>
>>> On Sat, Apr 2, 2016 at 2:48 PM, Damith Wickramasinghe 
>>> wrote:
>>>
 Hi Mohamed,

 I was able to reproduce it. We'll look into this. At the Mean time can
 you please tell us the CEP version you are using.

 Reagrds,
 Damith.

 On Sat, Apr 2, 2016 at 2:15 PM, Mohamed Rilfi 
 wrote:

> Dear All
>
> *In the Following Execution Plan the event staying forever in the one
> min time window "ins#window.time(1 min)" *
>
> /* Enter a unique ExecutionPlan */
> @Plan:name('R_H_Match')
>
> /* Enter a unique description for ExecutionPlan */
> -- @Plan:description('ExecutionPlan')
>
> /* define streams/tables and write queries here ... */
>
> @Import('RelatedStream:1.0.0')
> define stream rs (ID string, product string, uc1 string, state string,
> brand string, model string, type string);
>
> @Import('InputStream:1.0.0')
> define stream ins (ID string, product string, uc1 string, state
> string, brand string, model string, type string, tweet string);
>
>
>
> @Export('matchingStream:1.0.0')
> define stream ms (rID string, rproduct string, ruc1 string, rstate
> string, rbrand string, rmodel string, rtype string, hID string, hproduct
> string, huc1 string, hstate string, hbrand string, hmodel string, htype
> string);
>
> from ins#window.time(1 min) as R
>   join rs#window.length(1) as H
>   on R.product == H.product and R.brand==H.brand and R.type==H.type
> and R.state!=H.state
> select R.ID as rID, R.product as rproduct , R.uc1 as ruc1 , R.state
> as rstate, R.brand as rbrand , R.model as rmodel , R.type as rtype ,
> H.ID as hID , H.product as hproduct , H.uc1 as huc1 , H.state as
> hstate , H.brand as hbrand, H.model as hmodel , H.type as htype
> insert into ms;
>
>
>
>
> Thanks & Best Regards
>
> --
>
> *M.R.M.Rilfi
> M.Sc in Computer Science (Reading) Moratuwa
> B.Sc Sp. Computer Science
> Dept. Computer Science & Engineering,University of Moratuwa
> ri...@live.com  , ri...@cse.mrt.ac.lk 
> 
> +94776284627 <%2B94776284627> *
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Software Engineer
 WSO2 Inc.; http://wso2.com
 
 lean.enterprise.middleware

 mobile: *+94728671315 <%2B94728671315>*


>>>
>>>
>>> --
>>> Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> 
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94728671315 <%2B94728671315>*
>>>
>>>
>>
>>
>> --
>>
>> *S. Suhothayan*
>> Technical Lead & Team Lead of WSO2 Complex Event Processor
>> *WSO2 Inc. *http://wso2.com
>> * *
>> lean . enterprise . middleware
>>
>>
>> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
>> http://suhothayan.blogspot.com/ twitter:
>> http://twitter.com/suhothayan  | linked-in:
>> http://lk.linkedin.com/in/suhothayan *
>>
>
>
>
> --
> Software Engineer
> WSO2 Inc.; http://wso2.com
> 
> lean.enterprise.middleware
>
> mobile: *+94728671315 <%2B94728671315>*
>
>


-- 

*S. Suhothayan*
Technical Lead & Team Lead of WSO2 Complex Event Processor
*WSO2 Inc. *http://wso2.com
* *
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
twitter: http://twi

[Dev] requiredRespHeaderClaimUris missing in WSO2 api manager 1.10

2016-04-12 Thread Vanjikumaran Sivajothy
Hi Folks,

I am using RequiredRespHeaderClaimUris  in wso2 apim 1.6 to configure the
user headers to the response. This configuration is missing from WSO2 api
manger 1.10 identity.xml

How can i configure WSO2 api manger 1.10 to get the user headers?



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


Re: [Dev] Handling Kubernetes Specific Configurations in Puppet/Hiera

2016-04-12 Thread Chamila De Alwis
On Tue, Apr 12, 2016 at 11:01 PM, Imesh Gunaratne  wrote:

> Looks good! Regarding the "iaas" folder, shall we rename it to default and
> remove the files under product/profile/?
>

+1.

I renamed this to `default`. `default` platform will contain all the common
data that will be overriden in other platforms. Now the Hiera hierarchy
looks like the following.

[image: Inline image 1]

Data such as pack filename will not have to be duplicated in all the
platforms, as it will  be found when the lookup reaches
`"wso2/%{::product_name}/%{::product_version}/default/%{::product_profile}"`
or `"wso2/%{::product_name}/%{::product_version}/default/default"` level.


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Handling Kubernetes Specific Configurations in Puppet/Hiera

2016-04-12 Thread Chamila De Alwis
Hi,

To continue the earlier concern to copy all the files inside
`repository/components/lib` folder without specifying their filenames in
the Hiera YAML, I think that would cause problems when multiple profiles
and platforms are provisioned. For example we don't need Kubernetes
Membership Scheme JAR file for a non-clustered setup, but we can't delete
that from Puppet either, because it has to support provisioning for
container image run on Kubernetes as well.


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Tue, Apr 12, 2016 at 11:40 PM, Chamila De Alwis 
wrote:

>
> On Tue, Apr 12, 2016 at 11:01 PM, Imesh Gunaratne  wrote:
>
>> Looks good! Regarding the "iaas" folder, shall we rename it to default
>> and remove the files under product/profile/?
>>
>
> +1.
>
> I renamed this to `default`. `default` platform will contain all the
> common data that will be overriden in other platforms. Now the
> Hiera hierarchy looks like the following.
>
> [image: Inline image 1]
>
> Data such as pack filename will not have to be duplicated in all the
> platforms, as it will  be found when the lookup reaches
> `"wso2/%{::product_name}/%{::product_version}/default/%{::product_profile}"`
> or `"wso2/%{::product_name}/%{::product_version}/default/default"` level.
>
>
> Regards,
> Chamila de Alwis
> Committer and PMC Member - Apache Stratos
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 API Manager 2.0.0-M2 Released!

2016-04-12 Thread Bhathiya Jayasekara
*WSO2 API Manager 2.0.0-M2 Released!*

WSO2 API Manager team is pleased to announce WSO2 API Manager 2.0.0-M2
release. Download distribution here
.
This release comes with following new features.

New Features

   - [APIMANAGER-4598 ] -
   Client side SDK generation feature
   - [APIMANAGER-4605 ] -
   Notify subscribers of new API Versions
   - [APIMANAGER-4606 ] - API
   Manager latency Breakdown Graph On API
   - [APIMANAGER-4628 ] - SDK
   Support for Applications on the API Store
   - [APIMANAGER-4629 ] - Use
   the WSO2 Bootstrap theme for the Publisher and Store



Known Issues

For the list of known issues, click here
.


Reporting Problems
Issues can be reported through public JIRA
 project assigned to WSO2 APIM.


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


[Dev] WSO2 Carbon Kernel 5.1.0-alpha Released

2016-04-12 Thread Niranjan Karunanandham
*WSO2 Carbon Kernel 5.1.0-alpha Released*

The Carbon team is pleased to announce the release of Carbon
Kernel 5.1.0-alpha. It is now available to download from here
.

*Improvements and Bug fixes*
https://wso2.org/jira/issues/?filter=13024

*Known Issues*
https://wso2.org/jira/issues/?filter=13025

*How to Contribute*

   - WSO2 Carbon Kernel code is hosted in github.
   - The Git repository is https://github.com/wso2/carbon-kernel/
   - Carbon Kernel 5.1.0-alpha release tag is
   https://github.com/wso2/carbon-kernel/releases/tag/v5.1.0-alpha
   - Please report issues at Carbon Jira,
   https://wso2.org/jira/browse/CARBON


*Contact Us *

​WSO2 Carbon developers​ can be contacted via following mailing lists:

   - WSO2 Developers List: dev@wso2.org
   - WSO2 Architecture List: architect...@wso2.org

​You can download the released distribution from the following location.
http://wso2.com/products/carbon/

​Thank you for your interest in WSO2 Carbon Kernel​.

Best Regards
Carbon Team​

-- 

*Niranjan Karunanandham*
Senior Software Engineer - WSO2 Inc.
WSO2 Inc.: http://www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IOT] How to start building device types in IoTS using Developer Studio

2016-04-12 Thread 云展智创
Hi Geesara,

Thank you for your so detail reply. It really help me.

I have 2 more questions:
1. As I have to use cdmf-devicetype-archetype for M3 release to create the new 
device type, Is that means the new device type CAN NOT be deploy in M4 or later 
release of IoTS (because of the package dependencies)? Then how to smoothly 
reuse that created new device type in the coming GA version of IoTS? Can I 
build the product-iot project (master) to create the newest deployable IoTS and 
use it for testing, but I think there may be some errors in device-deploy.xml 
and other places because the product-iot is still changing?

2. I have red the the content in "Writing Your Own Device Connector” before, 
but there is little information about UI design. I know that we can create 
extensions for customized UI development as IoTS use UUF framework. My 
questions is do we have a WYSIWYG IDE tools to design the ui extensions for my 
device types. Is it to use jaggery project in Developer Studio to design ui? or 
I need to wait for the next release of IoTS as those features are in that 
release?

Thanks Geesara.

--
Zhanwen Zhou (Jason)

在 2016年4月12日,下午10:44,Geesara Prathap  写道:

> Hi Jason,
> 
> I have forked the product-iot project, cloned into my desktop. After running 
> mvn eclipse:eclipse in product-iot, I can only find 3 projects 
> (cdmf-devicetype-archetype, mdm-android-agent-archetype, 
> org.wso.iot.admin.styles) when I import projects in product-iot folder. Is 
> that right?
> 
> This is not the right approach you need to follow. First of all, you don't 
> need to download product-iots. What you need is download IoTS pack from 
> here[1]. Then there are some sample device type plugins which are in the 
> sample folder you can try out. I hope you have tried how to create new device 
> type plugin using maven archetype by now. 
> 
> How can I import the whole iot project and start creating my blocks and 
> building them with Maven? 
> 
> So open any samples using wso2 developer studio or any other IDE which 
> support maven as a maven project. In M3, some of the dependencies are getting 
> as system dependencies. So don't move or relocated sample device types 
> plugins from sample folder. So once you created device type plugin from maven 
> archetype you can do any changes to each component as you required. But 
> device-deployer.xml can't use to redeploy your device type plugin. This 
> feature wasn't included in M3 pack. What you can do is as an example let's 
> say you have done some changes on  controller or manager web app. Then you 
> have to copy and paste each web app into 
> /repository/deployment/server/webapps. Listed below each component where to 
> copy once done some changes on it. 
> 
> controller/manager web app -  /repository/deployment/server/webapps
> plugin -/repository/components/dropins 
> (need to restart server to apply new changes)
> analytics carbonapps - /repository/deployment/server/carbonapps
> UI units -  
> /repository/deployment/server/jaggeryapps/devicemgt/app/units 
>   
> 
> Note: this structure is applied to M3 and all paths are taken relative to 
> IoTS_HOME.
> This[2] explains each and every component separately how to write your own 
> device type plugin.
> 
> 
> For example, to create and build a new device type with 
> cdmf-devicetype-archetype in Developer Studio.
> 
> This feature will be available in next release of IoTS.
> 
> 
> 1.https://github.com/wso2/product-iots/releases/tag/IoTS-1.0.0-M3
> 2.https://docs.wso2.com/display/IoTS100/Writing+Your+Own+Device+Connector
> 
> Thanks,
> Geesara
> 
> 
> On Tue, Apr 12, 2016 at 6:49 PM, 云展智创  wrote:
> Hi all,
> 
> Could you give me some advices on how to start building iot device types in 
> IoTS using Developer Studio?
> 
> I have forked the product-iot project, cloned into my desktop. After running 
> mvn eclipse:eclipse in product-iot, I can only find 3 projects 
> (cdmf-devicetype-archetype, mdm-android-agent-archetype, 
> org.wso.iot.admin.styles) when I import projects in product-iot folder. Is 
> that right? How can I import the whole iot project and start creating my 
> blocks and building them with Maven? For example, to create and build a new 
> device type with cdmf-devicetype-archetype in Developer Studio.
> 
> And how can I design the ui of the new iot device type plugin with Developer 
> Studio? Is that WYSIWYG design interface with Developer Studio?
> 
> Thanks.
> 
> --
> Zhanwen Zhou (Jason)
> 
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
> 
> 
> 
> -- 
> Geesara Prathap Kulathunga
> Software Engineer
> WSO2 Inc; http://wso2.com
> Mobile : +940772684174
> 

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


Re: [Dev] Issue in CEP time window

2016-04-12 Thread Damith Wickramasinghe
Hi,

Noted suho.

@Mohamed I have created a jira for this.[1] Please refer it to see progress.

[1]https://wso2.org/jira/browse/CEP-1487

Regards,
Damith


On Tue, Apr 12, 2016 at 10:27 PM, Sriskandarajah Suhothayan 
wrote:

> Hi Damith
>
> In that case we have to fix it right, else it will not be consistent.
>
> Regards
> Suho
>
> On Tue, Apr 12, 2016 at 8:03 PM, Damith Wickramasinghe 
> wrote:
>
>> Hi Suho,
>>
>> Mohamed is using WSO2 DAS 3.0.0 which is using siddhi 3.0.3. I could see
>> the same issue in latest siddhi as well for a one event sent to time
>> window. But when there are more than one event in time window then events
>> gets expired as expected. Since there wont be just one event in a window
>> this issue won't occur in real scenarios. Are we fixing this ?
>>
>> Regards,
>> Damith.
>>
>> On Tue, Apr 12, 2016 at 4:59 PM, Sriskandarajah Suhothayan > > wrote:
>>
>>> Hi Mohamed
>>>
>>> Were you able to solve the issue. with the latest pack?
>>>
>>> Suho
>>>
>>> On Sun, Apr 3, 2016 at 7:35 AM, Damith Wickramasinghe 
>>> wrote:
>>>
 Hi Mohamed,

 can you tel us how did you reproduced it? In my case I had only event
 sent to time window stream but in real scenario there will be many events
 and then this issue won't occur. Can you please try that way.

 Regards,
 Damith.

 On Sat, Apr 2, 2016 at 2:48 PM, Damith Wickramasinghe >>> > wrote:

> Hi Mohamed,
>
> I was able to reproduce it. We'll look into this. At the Mean time can
> you please tell us the CEP version you are using.
>
> Reagrds,
> Damith.
>
> On Sat, Apr 2, 2016 at 2:15 PM, Mohamed Rilfi 
> wrote:
>
>> Dear All
>>
>> *In the Following Execution Plan the event staying forever in the one
>> min time window "ins#window.time(1 min)" *
>>
>> /* Enter a unique ExecutionPlan */
>> @Plan:name('R_H_Match')
>>
>> /* Enter a unique description for ExecutionPlan */
>> -- @Plan:description('ExecutionPlan')
>>
>> /* define streams/tables and write queries here ... */
>>
>> @Import('RelatedStream:1.0.0')
>> define stream rs (ID string, product string, uc1 string, state
>> string, brand string, model string, type string);
>>
>> @Import('InputStream:1.0.0')
>> define stream ins (ID string, product string, uc1 string, state
>> string, brand string, model string, type string, tweet string);
>>
>>
>>
>> @Export('matchingStream:1.0.0')
>> define stream ms (rID string, rproduct string, ruc1 string, rstate
>> string, rbrand string, rmodel string, rtype string, hID string, hproduct
>> string, huc1 string, hstate string, hbrand string, hmodel string, htype
>> string);
>>
>> from ins#window.time(1 min) as R
>>   join rs#window.length(1) as H
>>   on R.product == H.product and R.brand==H.brand and R.type==H.type
>> and R.state!=H.state
>> select R.ID as rID, R.product as rproduct , R.uc1 as ruc1 , R.state
>> as rstate, R.brand as rbrand , R.model as rmodel , R.type as rtype ,
>> H.ID as hID , H.product as hproduct , H.uc1 as huc1 , H.state as
>> hstate , H.brand as hbrand, H.model as hmodel , H.type as htype
>> insert into ms;
>>
>>
>>
>>
>> Thanks & Best Regards
>>
>> --
>>
>> *M.R.M.Rilfi
>> M.Sc in Computer Science (Reading) Moratuwa
>> B.Sc Sp. Computer Science
>> Dept. Computer Science & Engineering,University of Moratuwa
>> ri...@live.com  , ri...@cse.mrt.ac.lk 
>> 
>> +94776284627 <%2B94776284627> *
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Software Engineer
> WSO2 Inc.; http://wso2.com
> 
> lean.enterprise.middleware
>
> mobile: *+94728671315 <%2B94728671315>*
>
>


 --
 Software Engineer
 WSO2 Inc.; http://wso2.com
 
 lean.enterprise.middleware

 mobile: *+94728671315 <%2B94728671315>*


>>>
>>>
>>> --
>>>
>>> *S. Suhothayan*
>>> Technical Lead & Team Lead of WSO2 Complex Event Processor
>>> *WSO2 Inc. *http://wso2.com
>>> * *
>>> lean . enterprise . middleware
>>>
>>>
>>> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
>>> http://suhothayan.blogspot.com/ twitter:
>>> http://twitter.com/suhothayan  | linked-in:
>>> http://lk.linkedin.com/in/suhothayan *
>>>
>>
>>
>>
>> --
>> Software Engineer
>> WSO2 Inc.; http://wso2.com
>> 

Re: [Dev] SnapshotService info logs to debug mode

2016-04-12 Thread Nirmal Fernando
I think I found what's happening.

* CEP starts to synch from a Snapshot as soon as it got to know that
there's a new member, hence, it complains that there're no exec. plans
(other node is still starting up, hence no execution plans yet). (there was
a NPE while doing this and I fixed it in
https://github.com/wso2/siddhi/pull/135/files)
* Then the active node, keeps trying till the other node gets to the
correct state.

And I think we can implement an exponential backoff instead of doing the
check one after another. Wdyt?


On Tue, Apr 12, 2016 at 2:26 PM, Nirmal Fernando  wrote:

> Yes me too. There were more logs. Basically, once the other node joined,
> these kind of logs got printed around 3/4 times.
>
> On Tue, Apr 12, 2016 at 2:18 PM, Sriskandarajah Suhothayan 
> wrote:
>
>> I'm wondering why there are lots of Snapshot taken at with close time
>> gap.
>>
>> On Tue, Apr 12, 2016 at 1:56 PM, Nirmal Fernando  wrote:
>>
>>> Hi CEP team,
>>>
>>> Shall we move these info logs to debug level?
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,094]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>>> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,096]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
>>> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>>> serialization started ...
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>>> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
>>> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>>> serialization started ...
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>>> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
>>> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>>> serialization started ...
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>>> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
>>> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>>> serialization started ...
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>>
>>> TID: [-1] [] [2016-04-12 08:24:47,103]  INFO
>>> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
>>> serialization finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>>> --
>>>
>>> Thanks & regards,
>>> Nirmal
>>>
>>> Team Lead - WSO2 Machine Learner
>>> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
>>> Mobile: +94715779733
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>>
>>>
>>
>>
>> --
>>
>> *S. Suhothayan*
>> Technical Lead & Team Lead of WSO2 Complex Event Processor
>> *WSO2 Inc. *http://wso2.com
>> * *
>> lean . enterprise . middleware
>>
>>
>> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
>> http://suhothayan.blogspot.com/ twitter:
>> http://twitter.com/suhothayan

[Dev] [DAS] Adding a relative path in external-spark-classpath.conf doesn't work

2016-04-12 Thread Nirmal Fernando
Hi,

* Even though we have implemented the support for relative paths at
repository/conf/analytics/spark/external-spark-classpath.conf file, it
isn't working properly.

  if (fileExists(line)) {

scp = scp + separator + line;

} *else if (fileExists(carbonHome + File.separator + line))
{*

*scp = scp + separator + carbonHome + File.separator +
line;*

*} *else {

throw new IOException("File not found : " + line);

}

  

  

  private static boolean fileExists(String path) {

File tempFile = new File(path);

return tempFile.exists() && !tempFile.isDirectory();

   }
* We check for file.exists in order to determine the existence of the file
and it'll be true even if it's a relative path in some cases (where current
execution directory = carbon.home).
* But Spark needs the path to be absolute.
* Hence the fix was to check whether the path is absolute too.

https://github.com/wso2/carbon-analytics/pull/170/files

Please review and merge this PR.

-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, 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] [DAS] Adding a relative path in external-spark-classpath.conf doesn't work

2016-04-12 Thread Niranda Perera
Hi Nirmal,

Thanks for pointing this out. I will merge the PR.

Rgds
On Apr 13, 2016 08:35, "Nirmal Fernando"  wrote:

> Hi,
>
> * Even though we have implemented the support for relative paths at
> repository/conf/analytics/spark/external-spark-classpath.conf file, it
> isn't working properly.
>
>   if (fileExists(line)) {
>
> scp = scp + separator + line;
>
> } *else if (fileExists(carbonHome + File.separator +
> line)) {*
>
> *scp = scp + separator + carbonHome + File.separator +
> line;*
>
> *} *else {
>
> throw new IOException("File not found : " + line);
>
> }
>
>   
>
>   
>
>   private static boolean fileExists(String path) {
>
> File tempFile = new File(path);
>
> return tempFile.exists() && !tempFile.isDirectory();
>
>}
> * We check for file.exists in order to determine the existence of the file
> and it'll be true even if it's a relative path in some cases (where current
> execution directory = carbon.home).
> * But Spark needs the path to be absolute.
> * Hence the fix was to check whether the path is absolute too.
>
> https://github.com/wso2/carbon-analytics/pull/170/files
>
> Please review and merge this PR.
>
> --
>
> Thanks & regards,
> Nirmal
>
> Team Lead - WSO2 Machine Learner
> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
> Mobile: +94715779733
> Blog: http://nirmalfdo.blogspot.com/
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] If you have a custom UDF, make sure you add the path to jar in external-spark-classpath.conf to get it work on HA

2016-04-12 Thread Nirmal Fernando
Hi All,

Just want to pass this information, if you are not aware already.

If you have a Jar with custom UDFs, make sure you add the relative path to
jars in repository/conf/analytics/spark/external-spark-classpath.conf file
in order for the class to be used properly in a HAed environment.

Sample:

# --

# ADD ADDITIONAL JARS TO THE SPARK CLASSPATH

# --

# Use this config file to add additional jars to the $SPARK_CLASSPATH
system variable.

# Specify the location of the jar separated by a new line.

repository/components/plugins/org.wso2.carbon.analytics.apim.spark_1.0.0.SNAPSHOT.jar

-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, 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] [DAS] Adding a relative path in external-spark-classpath.conf doesn't work

2016-04-12 Thread Nirmal Fernando
Thanks, Niranda for merging.

On Wed, Apr 13, 2016 at 8:48 AM, Niranda Perera  wrote:

> Hi Nirmal,
>
> Thanks for pointing this out. I will merge the PR.
>
> Rgds
> On Apr 13, 2016 08:35, "Nirmal Fernando"  wrote:
>
>> Hi,
>>
>> * Even though we have implemented the support for relative paths at
>> repository/conf/analytics/spark/external-spark-classpath.conf file, it
>> isn't working properly.
>>
>>   if (fileExists(line)) {
>>
>> scp = scp + separator + line;
>>
>> } *else if (fileExists(carbonHome + File.separator +
>> line)) {*
>>
>> *scp = scp + separator + carbonHome + File.separator
>> + line;*
>>
>> *} *else {
>>
>> throw new IOException("File not found : " + line);
>>
>> }
>>
>>   
>>
>>   
>>
>>   private static boolean fileExists(String path) {
>>
>> File tempFile = new File(path);
>>
>> return tempFile.exists() && !tempFile.isDirectory();
>>
>>}
>> * We check for file.exists in order to determine the existence of the
>> file and it'll be true even if it's a relative path in some cases (where
>> current execution directory = carbon.home).
>> * But Spark needs the path to be absolute.
>> * Hence the fix was to check whether the path is absolute too.
>>
>> https://github.com/wso2/carbon-analytics/pull/170/files
>>
>> Please review and merge this PR.
>>
>> --
>>
>> Thanks & regards,
>> Nirmal
>>
>> Team Lead - WSO2 Machine Learner
>> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
>> Mobile: +94715779733
>> Blog: http://nirmalfdo.blogspot.com/
>>
>>
>>


-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, 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] Representing Data Types in JSON schema when objects hold values

2016-04-12 Thread Sohani Weerasinghe
Hi All,

Please note that if an element contains attributes or properties we are
considering it as an object and if it only holds a value then it will be
considered as a primitive type

eg:

sample
0112655655
0112655656
 

phone will treat as a primitive array and the schema would be as follows


{
"$schema": "http://json-schema.org/draft-04/schema#";,
"title": "person",
"id": "http://wso2jsonschema.org";,
"type": "object",
"properties": {
"firstName": {
"id": "http://wso2jsonschema.org/firstName";,
"type": "string"
},
"phone": {
"id": "http://wso2jsonschema.org/phone";,
"type": "array",
"items": [{
*"id": "http://wso2jsonschema.org/phone/phone
",*
*"type" :"number"*

}]
}
}
}




sample
071655339


Since phone has an attribute, phone will be treated as an object and the
schema would be as follows

{
"$schema": "http://json-schema.org/draft-04/schema#";,
"title": "person",
"id": "http://wso2jsonschema.org";,
"type": "object",
"properties": {
"firstName": {
"id": "http://wso2jsonschema.org/firstName";,
"type": "string"
},
"phone": {
"id": "http://wso2jsonschema.org/phone";,
*"type":"object",*
*"value":{*
* "type": "number"*
*}*
"attributes": {
"primary": {
"id": "http://wso2jsonschema.org/primary";,
"type": "boolean"
}
}
}
}
}

Thanks,
Sohani


Sohani Weerasinghe
Software Engineer
WSO2, Inc: http://wso2.com

Mobile  : +94 716439774
Blog :http://christinetechtips.blogspot.com/
Twitter  : https://twitter.com/sohanichristine

On Tue, Apr 12, 2016 at 4:51 PM, Susinda Perera  wrote:

> Implemented above scenarios (also mentioned in [1]) in schema generation.
>
> [1] -
> https://docs.google.com/a/wso2.com/document/d/1s820PSZlhRYq8kGc9GFwJaMcpQX8X4jz9sFvo1bK6rI/edit?usp=sharing
>
>
> On Tue, Apr 12, 2016 at 3:06 PM, Sohani Weerasinghe 
> wrote:
>
>> Hi All,
>>
>> Please find below details on the support provided in defining the data
>> types for objects( when holding values) in JSON schema.
>>
>> Problem:
>>
>> When an object array or a primitive array or an object  holds a value,
>> there should be a way to define the data type of that value in the schema.
>>
>> http://www.w3.org/TR/html4/";>
>> sample
>> *071771* <071771>
>> 01
>> *0112655655* <0112655655>01
>> 
>>
>> Solution:
>>
>> We have introduced an object called "value" as below in defining the data
>> type
>>
>> "value":{
>>   "type": "number"
>>  }
>>
>>  1. An object array with attributes, properties and values
>>
>> http://www.w3.org/TR/html4/";>
>>sample
>>
>>   0112655655
>>   01
>>
>>
>>   0112655655
>>   01
>>
>> 
>>
>> {
>>"$schema":"http://json-schema.org/draft-04/schema#";,
>>"title":"person",
>>"id":"http://wso2jsonschema.org";,
>>"type":"object",
>>"properties":{
>>   "firstName":{
>>  "id":"http://wso2jsonschema.org/firstName";,
>>  "type":"string"
>>   },
>>   "phone":{
>>  "id":"http://wso2jsonschema.org/phone";,
>>  "type":"array",
>>  "items":[
>> {
>>"id":"http://wso2jsonschema.org/phone/0";,
>>"type":"object",
>>   * "value":{  *
>> *  "type":"number"*
>> *   },*
>>"properties":{
>>   "ext":{
>>  "id":"http://wso2jsonschema.org/phone/0/ext";,
>>  "type":"number"
>>   }
>>},
>>"attributes":{
>>   "primary":{
>>  "id":"http://wso2jsonschema.org/phone/0/primary";,
>>  "type":"boolean"
>>   }
>>}
>> }
>>  ]
>>   }
>>}
>> }
>>
>> 2. Primitive array with values
>>
>> 
>>sample
>>0112655655
>>0112655656
>> 
>>
>> {
>>"$schema":"http://json-schema.org/draft-04/schema#";,
>>"title":"person",
>>"id":"http://wso2jsonschema.org";,
>>"type":"object",
>>"properties":{
>>   "firstName":{
>>  "id":"http://wso2jsonschema.org/firstName";,
>>  "type":"string"
>>   },
>>   "phone":{
>>  "id":"http://wso2jsonschema.org/phone";,
>>  "type":"array",
>>  "items":[
>> {
>>  *  "id":"http://wso2jsonschema.org/phone/phone
>> ",*
>> *   "type":"number"*
>> }
>>  ]
>>   }
>>}
>> }
>>
>> 3. Object with values
>>
>> 
>> sample
>> 071655339
>> 
>>
>> {
>>"$schema":"http://json-schema.org/draft-04/schema#";,
>>"title":"person",
>>"id":"http://wso2jsonschema.org";,
>>"type":"object",
>>"properties":{
>>   "firstName":{
>>  "id":"http://wso2jsonschema.org/firstName";,
>>  "type":"string"
>>   },
>>   "phone":{
>>  "id":"http://wso2jsonschema.org/phone";,
>>  "type":"object",
>> *