stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lahiru Sandaruwan <lahi...@wso2.com>
Subject Re: Rules file
Date Mon, 02 Dec 2013 18:11:44 GMT
On Mon, Dec 2, 2013 at 11:35 PM, Lahiru Sandaruwan <lahirus@wso2.com> wrote:

> Nirmal,
>
> In minimum rule, it runs against all the clusters[1]. But in
> ClusterMonitor thread is run per cluster which is correct.
>
> Didn't you update "Minimum Rule" in the rules file, or is it a separate
> rules file that you have used?
>
>
I meant whether you have used a different Rules file at deployment time of
the Stratos, which is different to default one in the products/autoscaler
at [1].

Thanks.



>
> [1]
>
> rule "Minimum Rule"
> dialect "mvel"
>        when
>        $service : Service ()
>        $cluster : Cluster () from  $service.getClusters()
>        $deploymentPolicy : DeploymentPolicy(id ==
> $cluster.getDeploymentPolicyName() ) from $manager.getDeploymentPolicyList()
>        $partitionGroup : PartitionGroup () from
>  $deploymentPolicy.getPartitionGroups()
>        $partition : Partition () from $partitionGroup.getPartitions()
>        $clusterContext : ClusterContext() from
> $context.getClusterContext($cluster.getClusterId())
>        eval($clusterContext.getMemberCount($partition.getId()) <
> $partition.getPartitionMembersMin())
>
>
>        then
>        int memberCountToBeIncreased = $partition.getPartitionMembersMin()
> - $clusterContext.getMemberCount($partition.getId());
>        if($evaluator.delegateSpawn($partition,$cluster.getClusterId(),
> memberCountToBeIncreased)){
>    $clusterContext.increaseMemberCountInPartitionBy($partition.getId(),
> memberCountToBeIncreased);
>        }
> end
> --
> --
> Lahiru Sandaruwan
> Software Engineer,
> Platform Technologies,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com cell: (+94) 773 325 954
> blog: http://lahiruwrites.blogspot.com/
> twitter: http://twitter.com/lahirus
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
--
Lahiru Sandaruwan
Software Engineer,
Platform Technologies,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com cell: (+94) 773 325 954
blog: http://lahiruwrites.blogspot.com/
twitter: http://twitter.com/lahirus
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Mime
View raw message