You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2013/12/25 21:41:19 UTC

git commit: Null check for partition in scale check rules file

Updated Branches:
  refs/heads/master 006301284 -> 09f9165ca


Null check for partition in scale check rules file


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/09f9165c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/09f9165c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/09f9165c

Branch: refs/heads/master
Commit: 09f9165ca61d9461fc27c1c24a6142640579e5e5
Parents: 0063012
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Thu Dec 26 02:15:57 2013 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Thu Dec 26 02:15:57 2013 +0530

----------------------------------------------------------------------
 products/autoscaler/modules/distribution/src/main/conf/scaling.drl | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/09f9165c/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 49b89b6..457f9a0 100644
--- a/products/autoscaler/modules/distribution/src/main/conf/scaling.drl
+++ b/products/autoscaler/modules/distribution/src/main/conf/scaling.drl
@@ -65,6 +65,7 @@ dialect "mvel"
         averageLimit : Float() from  $loadThresholds.getRequestsInFlight().getAverage()
 
         partition :  Partition() from autoscaleAlgorithm.getNextScaleUpPartition($networkPartitionContext, clusterId)
+        eval(partition != null)
         predictedValue : Float() from $delegator.getPredictedValueForNextMinute(lbStatAverage, lbStatGradient, lbStatSecondDerivative, 1)
         eval(log.debug("predicted value: " + predictedValue))
         eval(log.debug("average limit: " + averageLimit))
@@ -95,6 +96,7 @@ dialect "mvel"
         averageLimit : Float() from  $loadThresholds.getRequestsInFlight().getAverage()
 
         partition :  Partition() from autoscaleAlgorithm.getNextScaleDownPartition($networkPartitionContext, clusterId)
+        eval(partition != null)
         predictedValue :  Float() from $delegator.getPredictedValueForNextMinute(lbStatAverage, lbStatGradient, lbStatSecondDerivative, 1)
         eval(log.debug("predicted value: " + predictedValue))
         eval(log.debug("average limit: " + averageLimit))