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 2013/12/23 11:57:03 UTC

[1/2] git commit: Adjusting some logs to show better information

Updated Branches:
  refs/heads/master bb1704007 -> 7930d804e


Adjusting some logs to show better information


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

Branch: refs/heads/master
Commit: 3b120d830cd5d4da1388cd0ae617ab4f2e564c11
Parents: bbbe3a0
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Mon Dec 23 16:31:18 2013 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Mon Dec 23 16:31:18 2013 +0530

----------------------------------------------------------------------
 .../stratos/autoscaler/AutoscalerContext.java       |  1 -
 .../topology/AutoscalerTopologyReceiver.java        | 16 ++++++++--------
 .../stratos/autoscaler/util/AutoscalerUtil.java     | 15 ++++++++++++++-
 3 files changed, 22 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/3b120d83/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/AutoscalerContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/AutoscalerContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/AutoscalerContext.java
index e809db9..7b4b8da 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/AutoscalerContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/AutoscalerContext.java
@@ -42,7 +42,6 @@ public class AutoscalerContext {
     }
 
     public void addMonitor(ClusterMonitor monitor) {
-    	log.info("Adding moniter clusterid" + monitor.getClusterId());
         monitors.put(monitor.getClusterId(), monitor);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/3b120d83/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyReceiver.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyReceiver.java
index 520509f..dab18cb 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyReceiver.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyReceiver.java
@@ -90,14 +90,14 @@ public class AutoscalerTopologyReceiver implements Runnable {
                 TopologyManager.acquireReadLock();
                 for(Service service : TopologyManager.getTopology().getServices()) {
                     for(Cluster cluster : service.getClusters()) {
-                            Thread th;
-                            if(cluster.isLbCluster()){
-                                th = new Thread(new LBClusterMonitorAdder(cluster));
-                            }else{
-                                th = new Thread(new ClusterMonitorAdder(cluster));
-                            }
-
-                            th.start();
+                        Thread th;
+                        if(cluster.isLbCluster()){
+                            th = new Thread(new LBClusterMonitorAdder(cluster));
+                        }else{
+                            th = new Thread(new ClusterMonitorAdder(cluster));
+                        }
+
+                        th.start();
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/3b120d83/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
index 85aa783..74c9fe0 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
@@ -140,15 +140,25 @@ public class AutoscalerUtil {
                         } else if(MemberStatus.Suspended.equals(member.getStatus())){
                             partitionContext.addFaultyMember(memberId);
                         }
-
                         partitionContext.addMemberStatsContext(new MemberStatsContext(memberId));
+                        if(log.isInfoEnabled()){
+                            log.info(String.format("Member stat context has been added: [member] %s", memberId));
+                        }
                     }
 
                 }
                 networkPartitionContext.addPartitionContext(partitionContext);
+                if(log.isInfoEnabled()){
+                    log.info(String.format("Partition context has been added: [partition] %s",
+                            partitionContext.getPartitionId()));
+                }
             }
 
             clusterMonitor.addNetworkPartitionCtxt(networkPartitionContext);
+            if(log.isInfoEnabled()){
+                log.info(String.format("Network partition context has been added: [network partition] %s",
+                            networkPartitionContext.getId()));
+            }
         }
         
         
@@ -232,6 +242,9 @@ public class AutoscalerUtil {
                     }
 
                     partitionContext.addMemberStatsContext(new MemberStatsContext(memberId));
+                    if(log.isInfoEnabled()){
+                        log.info(String.format("Member stat context has been added: [member] %s", memberId));
+                    }
                 }
 
             }


[2/2] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos

Posted by la...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos


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

Branch: refs/heads/master
Commit: 7930d804e8376625e0df07fe079cbc14b9d83ce5
Parents: 3b120d8 bb17040
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Mon Dec 23 16:31:40 2013 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Mon Dec 23 16:31:40 2013 +0530

----------------------------------------------------------------------
 .../health/HealthEventMessageDelegator.java     | 41 ++++++++++----------
 .../controller/topology/TopologyBuilder.java    |  2 +-
 .../topology/TopologyEventSender.java           |  6 ++-
 .../event/topology/MemberActivatedEvent.java    |  9 -----
 .../event/topology/MemberStartedEvent.java      |  9 -----
 .../event/topology/MemberSuspendedEvent.java    |  9 -----
 .../event/topology/MemberTerminatedEvent.java   |  9 -----
 .../MemberActivatedMessageProcessor.java        | 21 +++++-----
 .../topology/MemberStartedMessageProcessor.java | 21 +++++-----
 .../MemberSuspendedMessageProcessor.java        | 21 +++++-----
 .../MemberTerminatedMessageProcessor.java       | 21 +++++-----
 11 files changed, 70 insertions(+), 99 deletions(-)
----------------------------------------------------------------------