Updated Branches:
  refs/heads/master 8b7ca5c57 -> 3e2829207

Fix scaling drools 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/df066a0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/df066a0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/df066a0c

Branch: refs/heads/master
Commit: df066a0c9c631b48f599f3d4aa6fe86b52e7ebbd
Parents: 3ce7f9f
Author: Lahiru Sandaruwan <[email protected]>
Authored: Sun Jan 19 10:14:44 2014 +0530
Committer: Lahiru Sandaruwan <[email protected]>
Committed: Sun Jan 19 10:14:44 2014 +0530

----------------------------------------------------------------------
 .../modules/distribution/src/main/conf/scaling.drl      | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/df066a0c/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 d6c3a78..ddb184e 100644
--- a/products/autoscaler/modules/distribution/src/main/conf/scaling.drl
+++ b/products/autoscaler/modules/distribution/src/main/conf/scaling.drl
@@ -113,8 +113,9 @@ dialect "mvel"
             }
         } else if(scaleDown){
 
+            log.debug("[scale-down] Decided to Scale down [cluster] " + 
clusterId);
             if($networkPartitionContext.getScaleDownRequestsCount() > 5 ){
-                log.debug("[scale-down] Reached scale down requests threshold 
[cluster] " + clusterId);
+                log.debug("[scale-down] Reached scale down requests threshold 
[cluster] " + clusterId + " Count " + 
$networkPartitionContext.getScaleDownRequestsCount());
                 $networkPartitionContext.resetScaleDownRequestsCount();
                 MemberStatsContext selectedMemberStatsContext = null;
                 double lowestOverallLoad = 0.0;
@@ -163,11 +164,12 @@ dialect "mvel"
 
                         $delegator.delegateTerminate(partitionContext, 
selectedMemberStatsContext.getMemberId());
                     }
-                } else{
-                    $networkPartitionContext.increaseScaleDownRequestsCount();
-                    log.debug("[scale-down] Not reached scale down requests 
threshold. " + " [cluster] " + clusterId);
                 }
-            }
+            } else{
+                 log.debug("[scale-down] Not reached scale down requests 
threshold. " + clusterId + " Count " + 
$networkPartitionContext.getScaleDownRequestsCount());
+                 $networkPartitionContext.increaseScaleDownRequestsCount();
+
+             }
         }  else{
             log.debug("[scaling] No decision made to either scale up or scale 
down ... ");
 

Reply via email to