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 2015/02/23 21:03:51 UTC

[2/2] stratos git commit: Adjusting few logs

Adjusting few logs


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

Branch: refs/heads/master
Commit: d4f59a2f680519ddf4a6f5d0733792e838768901
Parents: b25f5c0
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Tue Feb 24 01:33:37 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Tue Feb 24 01:33:37 2015 +0530

----------------------------------------------------------------------
 .../topology/AutoscalerTopologyEventReceiver.java     |  2 +-
 .../distribution/src/main/conf/drools/scaling.drl     | 14 ++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/d4f59a2f/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
index 4ec7d73..98a91dc 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
@@ -314,7 +314,7 @@ public class AutoscalerTopologyEventReceiver {
             @Override
             protected void onEvent(Event event) {
                 try {
-                    log.info("[MemberReadyToShutdownEvent] Received: " + event.getClass());
+                        log.info("[MemberReadyToShutdownEvent] Received: " + event.getClass());
                     MemberReadyToShutdownEvent memberReadyToShutdownEvent = (MemberReadyToShutdownEvent) event;
                     String clusterId = memberReadyToShutdownEvent.getClusterId();
                     AutoscalerContext asCtx = AutoscalerContext.getInstance();

http://git-wip-us.apache.org/repos/asf/stratos/blob/d4f59a2f/products/stratos/modules/distribution/src/main/conf/drools/scaling.drl
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/src/main/conf/drools/scaling.drl b/products/stratos/modules/distribution/src/main/conf/drools/scaling.drl
index 343f5cc..c4771f5 100644
--- a/products/stratos/modules/distribution/src/main/conf/drools/scaling.drl
+++ b/products/stratos/modules/distribution/src/main/conf/drools/scaling.drl
@@ -127,10 +127,11 @@ dialect "mvel"
                 if(clusterMaxMembers < numberOfRequiredInstances){
 
                     additionalInstances = clusterMaxMembers - nonTerminatedMembers;
-                    log.info("[scale-up] Required member count based on stat based scaling is higher than max, hence
-                            notifying to parent for possible group scaling or app bursting.
-                            [cluster] " + clusterId + " [instance id]" + clusterInstanceContext.getId() +
-                            " [max] " + clusterMaxMembers + " [number of required instances] " + numberOfRequiredInstances);
+                    log.info("[scale-up] Required member count based on stat based scaling is higher than max, hence"
+                            + " notifying to parent for possible group scaling or app bursting. [cluster] " + clusterId
+                            + " [instance id]" + clusterInstanceContext.getId() + " [max] " + clusterMaxMembers
+                            + " [number of required instances] " + numberOfRequiredInstances
+                            + " [additional instances to be created] " + additionalInstances);
                     delegator.delegateScalingOverMaxNotification(clusterId, clusterInstanceContext.getNetworkPartitionId(), clusterInstanceContext.getId());
                 } else {
 
@@ -139,7 +140,7 @@ dialect "mvel"
 
                 clusterInstanceContext.resetScaleDownRequestsCount();
 
-                log.debug("[scale-up] " + " has scaling dependents " + clusterInstanceContext.hasScalingDependants() + " [cluster] " + clusterId );
+                log.debug("[scale-up] " + " [has scaling dependents] " + clusterInstanceContext.hasScalingDependants() + " [cluster] " + clusterId );
                 if(clusterInstanceContext.hasScalingDependants()) {
 
                     log.debug("[scale-up] Notifying dependencies [cluster] " + clusterId);
@@ -151,7 +152,7 @@ dialect "mvel"
 
                     while(count != additionalInstances && partitionsAvailable){
 
-                        ClusterLevelPartitionContext partitionContext =  (ClusterLevelPartitionContext)autoscaleAlgorithm.getNextScaleUpPartitionContext(clusterInstanceContext.getPartitionCtxtsAsAnArray());
+                        ClusterLevelPartitionContext partitionContext = (ClusterLevelPartitionContext)autoscaleAlgorithm.getNextScaleUpPartitionContext(clusterInstanceContext.getPartitionCtxtsAsAnArray());
                         if(partitionContext != null){
 
                             log.info("[scale-up] Partition available, hence trying to spawn an instance to scale up!" );
@@ -160,6 +161,7 @@ dialect "mvel"
                             count++;
                         } else {
 
+                            log.debug("[scale-up] No partition available!, [cluster] " + clusterId);
                             partitionsAvailable = false;
                         }
                     }