Updated Branches: refs/heads/master 9ac01ebd5 -> 910d536d2
Added logs to scaling.drl Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/06c9e3ac Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/06c9e3ac Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/06c9e3ac Branch: refs/heads/master Commit: 06c9e3ac5fcb5a325729c25bc0b66ba4d5135034 Parents: 417e18f Author: Imesh Gunaratne <[email protected]> Authored: Thu Dec 26 03:58:52 2013 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Thu Dec 26 03:58:52 2013 +0530 ---------------------------------------------------------------------- .../distribution/src/main/conf/scaling.drl | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/06c9e3ac/products/autoscaler/modules/distribution/src/main/conf/scaling.drl ---------------------------------------------------------------------- diff --git a/products/autoscaler/modules/distribution/src/main/conf/scaling.drl b/products/autoscaler/modules/distribution/src/main/conf/scaling.drl index 457f9a0..3782d66 100644 --- a/products/autoscaler/modules/distribution/src/main/conf/scaling.drl +++ b/products/autoscaler/modules/distribution/src/main/conf/scaling.drl @@ -58,7 +58,10 @@ dialect "mvel" $networkPartitionContext : NetworkPartitionContext () eval(log.debug("Running scale up rule: [network-partition] " + $networkPartitionContext.getId())) $loadThresholds : LoadThresholds() from autoscalePolicy.getLoadThresholds() - autoscaleAlgorithm : AutoscaleAlgorithm() from $delegator.getAutoscaleAlgorithm($networkPartitionContext.getPartitionAlgorithm()) + algorithmName : String() from $networkPartitionContext.getPartitionAlgorithm(); + eval(log.debug("algorithm name " + algorithmName)) + autoscaleAlgorithm : AutoscaleAlgorithm() from $delegator.getAutoscaleAlgorithm(algorithmName) + eval(log.debug("algorithm " + autoscaleAlgorithm)) lbStatAverage : Float() from $networkPartitionContext.getAverageRequestsInFlight() lbStatGradient : Float() from $networkPartitionContext.getRequestsInFlightGradient() lbStatSecondDerivative : Float() from $networkPartitionContext.getRequestsInFlightSecondDerivative() @@ -66,20 +69,14 @@ dialect "mvel" partition : Partition() from autoscaleAlgorithm.getNextScaleUpPartition($networkPartitionContext, clusterId) eval(partition != null) - predictedValue : Float() from $delegator.getPredictedValueForNextMinute(lbStatAverage, lbStatGradient, lbStatSecondDerivative, 1) + predictedValue : Double() from $delegator.getPredictedValueForNextMinute(lbStatAverage, lbStatGradient, lbStatSecondDerivative, 1) eval(log.debug("predicted value: " + predictedValue)) eval(log.debug("average limit: " + averageLimit)) eval(log.debug("scale-up factor: " + $delegator.SCALE_UP_FACTOR)) eval(predictedValue > averageLimit * $delegator.SCALE_UP_FACTOR) then -// if (predictedValue*scaleUpFactor > averageLimit){ - //scale up - NetworkPartitionContext networkPartitionContext; - - $delegator.delegateSpawn($networkPartitionContext.getPartitionCtxt(partition.getId()), clusterId, lbRef); - -// } - + log.debug("scaling up"); + $delegator.delegateSpawn($networkPartitionContext.getPartitionCtxt(partition.getId()), clusterId, lbRef); end @@ -131,8 +128,6 @@ dialect "mvel" } if(selectedMemberStatsContext != null) $delegator.delegateTerminate(selectedMemberStatsContext.getMemberId()); - - end
