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 23:29:20 UTC
[1/2] git commit: Added logs to scaling.drl
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 <im...@apache.org>
Authored: Thu Dec 26 03:58:52 2013 +0530
Committer: Imesh Gunaratne <im...@apache.org>
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
[2/2] git commit: Merge remote-tracking branch 'origin/master'
Posted by im...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/910d536d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/910d536d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/910d536d
Branch: refs/heads/master
Commit: 910d536d2e413614bf1f2d5b09419e379fbc5b20
Parents: 06c9e3a 9ac01eb
Author: Imesh Gunaratne <im...@apache.org>
Authored: Thu Dec 26 03:59:11 2013 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Thu Dec 26 03:59:11 2013 +0530
----------------------------------------------------------------------
.../org/apache/stratos/autoscaler/NetworkPartitionContext.java | 3 ++-
.../apache/stratos/autoscaler/partition/PartitionManager.java | 4 ++--
.../org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java | 4 ++++
.../java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java | 2 +-
4 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------