Hi Asiri,

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

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

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

Thanks,
Lasantha


On 17 August 2014 11:54, Asiri Liyana Arachchi <[email protected]> wrote:

> Hi all,
>
> I'm using this [1] execution plan inside stratos single jvm installation.
>
> "select cluster_id,network_partition_id,avg(active_instances_count) as
> instances_count, avg(in_flight_request_count) as count , 
> *sum(served_request_count)
> as served_count*
>  insert into average_in_flight_requests "
>
> *sum*  doesn't  give expected output. I've checked the same query with a
> standalone cep 3.1.0 and it gave desired results.
> for an example : served_request_count =10 sent for four times to CEP
> within a minute then the out put(served_count) is 80 (most of the time) or
> 60 where it should be 40.
>
> I'm using stratos pack  4.0.0-rc4 (release )
>
> Can't figure out why this is happening. Any ideas?
>
> Thanks in advance.
>
> Regards,
> Asiri
>
>
>
> [1] : from avg_rif_stat
> select cluster_id, network_partition_id,active_instances_count,
> in_flight_request_count,served_request_count,
>  stratos:concat(cluster_id, '-' , network_partition_id) as
> avg_rif_cluster_network
> insert into avg_rif_concat;
>  define partition avg_rif_cluster_partition by
>  avg_rif_concat.avg_rif_cluster_network;
> from avg_rif_concat#window.timeBatch(1 min)
>  select cluster_id,network_partition_id,avg(active_instances_count) as
> instances_count, avg(in_flight_request_count) as count ,
> sum(served_request_count) as served_count
>  insert into average_in_flight_requests
> partition by avg_rif_cluster_partition;
>  from average_in_flight_requests
>      select cluster_id, network_partition_id,instances_count,
> served_count,
>          stratos:divider(served_count , instances_count) as
> requests_per_instance
>          insert into served_requests_per_instance;
>         from served_requests_per_instance#window.timeBatch(10 min)
> select cluster_id,network_partition_id, avg(requests_per_instance) as
> average_served_count
>  insert into average_served_request_count;
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


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

email: [email protected]
mobile: (+94) 71 5247551
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to