You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2013/12/25 20:09:38 UTC
git commit: Updated autoscaler rule logs
Updated Branches:
refs/heads/master d98f31e86 -> 5c93d0f5a
Updated autoscaler rule logs
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/5c93d0f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/5c93d0f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/5c93d0f5
Branch: refs/heads/master
Commit: 5c93d0f5ab9d390f80cb55830eb64ea6eb616c8e
Parents: d98f31e
Author: Imesh Gunaratne <im...@apache.org>
Authored: Thu Dec 26 00:39:26 2013 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Thu Dec 26 00:39:26 2013 +0530
----------------------------------------------------------------------
.../modules/distribution/src/main/conf/mincheck.drl | 9 ++++-----
.../modules/distribution/src/main/conf/scaling.drl | 16 ++++++++--------
2 files changed, 12 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/5c93d0f5/products/autoscaler/modules/distribution/src/main/conf/mincheck.drl
----------------------------------------------------------------------
diff --git a/products/autoscaler/modules/distribution/src/main/conf/mincheck.drl b/products/autoscaler/modules/distribution/src/main/conf/mincheck.drl
index 083d6b2..69a7b07 100755
--- a/products/autoscaler/modules/distribution/src/main/conf/mincheck.drl
+++ b/products/autoscaler/modules/distribution/src/main/conf/mincheck.drl
@@ -42,8 +42,7 @@ import org.apache.stratos.cloud.controller.pojo.MemberContext;
global org.apache.stratos.autoscaler.rule.RuleLog log;
global org.apache.stratos.autoscaler.policy.PolicyManager $manager;
-global org.apache.stratos.autoscaler.AutoscalerContext $context;
-global org.apache.commons.logging.Log log;
+global org.apache.stratos.autoscaler.AutoscalerContext $context;
global org.apache.stratos.autoscaler.rule.RuleTasksDelegator $delegator;
global org.apache.stratos.messaging.domain.topology.Topology $topology;
global java.util.Map partitionCtxts;
@@ -53,8 +52,8 @@ global java.lang.String lbRef;
rule "Minimum Rule"
dialect "mvel"
when
- eval(log.debug("Running minimum rule"))
- $ctxt : PartitionContext ()
+ $ctxt : PartitionContext ()
+ eval(log.debug("Running minimum rule: [partition] " + $ctxt.getPartitionId() + " [network-partition] " + $ctxt.getNetworkPartitionId()))
eval(log.debug("total member count: " + $ctxt.getTotalMemberCount()))
eval(log.debug("minimum member count: " + $ctxt.getMinimumMemberCount()))
eval($ctxt.getTotalMemberCount() < $ctxt.getMinimumMemberCount())
@@ -67,8 +66,8 @@ end
rule "Terminate Obsoleted Instances"
dialect "mvel"
when
- eval(log.debug("Running obsolete instances rule"))
$ctxt : PartitionContext ()
+ eval(log.debug("Running obsolete instances rule: [partition] " + $ctxt.getPartitionId() + " [network-partition] " + $ctxt.getNetworkPartitionId()))
eval(log.debug("obsolete member count: " + $ctxt.getObsoletedMembers().size()))
eval($ctxt.getObsoletedMembers().size() > 0)
memberId : String() from $ctxt.getObsoletedMembers()
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/5c93d0f5/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 9f6eeed..49b89b6 100644
--- a/products/autoscaler/modules/distribution/src/main/conf/scaling.drl
+++ b/products/autoscaler/modules/distribution/src/main/conf/scaling.drl
@@ -55,8 +55,8 @@ global java.lang.String lbRef;
rule "Scaler-up Rule"
dialect "mvel"
when
- eval(log.debug("Running scale up rule"))
$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())
lbStatAverage : Float() from $networkPartitionContext.getAverageRequestsInFlight()
@@ -66,9 +66,9 @@ dialect "mvel"
partition : Partition() from autoscaleAlgorithm.getNextScaleUpPartition($networkPartitionContext, clusterId)
predictedValue : Float() 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(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){
@@ -85,8 +85,8 @@ end
rule "Scaler-down Rule"
dialect "mvel"
when
- eval(log.debug("Running scale down rule"))
$networkPartitionContext : NetworkPartitionContext ()
+ eval(log.debug("Running scale down rule: [network-partition] " + $networkPartitionContext.getId()))
$loadThresholds : LoadThresholds() from autoscalePolicy.getLoadThresholds()
autoscaleAlgorithm : AutoscaleAlgorithm() from $delegator.getAutoscaleAlgorithm($networkPartitionContext.getPartitionAlgorithm())
lbStatAverage : Float() from $networkPartitionContext.getAverageRequestsInFlight()
@@ -96,9 +96,9 @@ dialect "mvel"
partition : Partition() from autoscaleAlgorithm.getNextScaleDownPartition($networkPartitionContext, clusterId)
predictedValue : Float() from $delegator.getPredictedValueForNextMinute(lbStatAverage, lbStatGradient, lbStatSecondDerivative, 1)
- eval(log.debug("predicted-value: " + predictedValue))
- eval(log.debug("average-limit: " + averageLimit))
- eval(log.debug("scale-down-factor: " + $delegator.SCALE_DOWN_FACTOR))
+ eval(log.debug("predicted value: " + predictedValue))
+ eval(log.debug("average limit: " + averageLimit))
+ eval(log.debug("scale-down factor: " + $delegator.SCALE_DOWN_FACTOR))
eval(predictedValue < averageLimit * $delegator.SCALE_DOWN_FACTOR)
then