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 2014/12/02 07:37:11 UTC

stratos git commit: Formatting vm cluster monitor code

Repository: stratos
Updated Branches:
  refs/heads/master 832fe6b89 -> ccce60dac


Formatting vm cluster monitor code


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

Branch: refs/heads/master
Commit: ccce60dac5c6cb8ec2056aa977aec55e9a814d4f
Parents: 832fe6b
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Tue Dec 2 12:08:47 2014 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Tue Dec 2 12:08:47 2014 +0530

----------------------------------------------------------------------
 .../monitor/cluster/VMClusterMonitor.java       | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/ccce60da/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
index 2c2e5bb..735ae4e 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
@@ -163,8 +163,10 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
     }
 
     public void monitor() {
+
         final Collection<ClusterLevelNetworkPartitionContext> clusterLevelNetworkPartitionContexts =
                 ((VMClusterContext) this.clusterContext).getNetworkPartitionCtxts().values();
+
         Runnable monitoringRunnable = new Runnable() {
             @Override
             public void run() {
@@ -182,6 +184,7 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
                         if (true) {
 
                             for (ClusterLevelPartitionContext partitionContext : instanceContext.getPartitionCtxts()) {
+
                                 // get active primary members in this partition context
                                 for (MemberContext memberContext : partitionContext.getActiveMembers()) {
                                     if (isPrimaryMember(memberContext)) {
@@ -206,23 +209,21 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
                                         instanceContext.getId()));
                             }
 
-                            minCheckFactHandle = AutoscalerRuleEvaluator.
-                                    evaluateMinCheck(getMinCheckKnowledgeSession()
-                                            , minCheckFactHandle, instanceContext);
+                            minCheckFactHandle = AutoscalerRuleEvaluator.evaluateMinCheck(getMinCheckKnowledgeSession(),
+                                    minCheckFactHandle, instanceContext);
 
-                            obsoleteCheckFactHandle = AutoscalerRuleEvaluator.
-                                    evaluateObsoleteCheck(getObsoleteCheckKnowledgeSession(),
-                                            obsoleteCheckFactHandle, instanceContext);
+                            obsoleteCheckFactHandle = AutoscalerRuleEvaluator.evaluateObsoleteCheck(
+                                    getObsoleteCheckKnowledgeSession(), obsoleteCheckFactHandle, instanceContext);
 
                             //checking the status of the cluster
-
                             boolean rifReset = instanceContext.isRifReset();
                             boolean memoryConsumptionReset = instanceContext.isMemoryConsumptionReset();
                             boolean loadAverageReset = instanceContext.isLoadAverageReset();
 
                             if (log.isDebugEnabled()) {
-                                log.debug("flag of rifReset: " + rifReset + " flag of memoryConsumptionReset" + memoryConsumptionReset
-                                        + " flag of loadAverageReset" + loadAverageReset);
+                                log.debug("Is rif Reset: " + rifReset
+                                        + " Is memoryConsumption Reset: " + memoryConsumptionReset
+                                        + " Is loadAverage Reset: " + loadAverageReset);
                             }
                             if (rifReset || memoryConsumptionReset || loadAverageReset) {
 
@@ -235,7 +236,6 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
                                 getScaleCheckKnowledgeSession().setGlobal("rifReset", rifReset);
                                 getScaleCheckKnowledgeSession().setGlobal("mcReset", memoryConsumptionReset);
                                 getScaleCheckKnowledgeSession().setGlobal("laReset", loadAverageReset);
-//                                    getScaleCheckKnowledgeSession().setGlobal("lbRef", lbReferenceType);
                                 getScaleCheckKnowledgeSession().setGlobal("isPrimary", false);
                                 getScaleCheckKnowledgeSession().setGlobal("primaryMembers", primaryMemberListInClusterInstance);