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 2014/12/12 10:01:35 UTC
stratos git commit: Changing info logs to debug in VMClusterMonitor
Repository: stratos
Updated Branches:
refs/heads/4.1.0-test e50e94c6f -> f1876e726
Changing info logs to debug in VMClusterMonitor
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f1876e72
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f1876e72
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f1876e72
Branch: refs/heads/4.1.0-test
Commit: f1876e72674530e6ddd94d853d359469b02c20f5
Parents: e50e94c
Author: Imesh Gunaratne <im...@apache.org>
Authored: Fri Dec 12 14:31:27 2014 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Fri Dec 12 14:31:27 2014 +0530
----------------------------------------------------------------------
.../monitor/cluster/VMClusterMonitor.java | 42 ++++++++++----------
1 file changed, 22 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/f1876e72/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 361148e..ec4947a 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
@@ -833,8 +833,8 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
synchronized (this) {
partitionCtxt.moveMemberToObsoleteList(memberId);
}
- if (log.isInfoEnabled()) {
- log.info(String.format("Faulty member is added to obsolete list and removed from the active members list: "
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Faulty member is added to obsolete list and removed from the active members list: "
+ "[member] %s [partition] %s [cluster] %s ", memberId, partitionId, clusterId));
}
@@ -861,8 +861,8 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
ClusterLevelPartitionContext clusterLevelPartitionContext;
clusterLevelPartitionContext = networkPartitionCtxt.getPartitionCtxt(partitionId);
clusterLevelPartitionContext.addMemberStatsContext(new MemberStatsContext(memberId));
- if (log.isInfoEnabled()) {
- log.info(String.format("Member stat context has been added successfully: "
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Member stat context has been added successfully: "
+ "[member] %s", memberId));
}
clusterLevelPartitionContext.movePendingMemberToActiveMembers(memberId);
@@ -919,14 +919,14 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
//move member to pending termination list
if (partitionCtxt.getPendingTerminationMember(memberId) != null) {
partitionCtxt.movePendingTerminationMemberToObsoleteMembers(memberId);
- if (log.isInfoEnabled()) {
- log.info(String.format("Member is removed from the pending termination members " +
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Member is removed from the pending termination members " +
"and moved to obsolete list: [member] %s " +
"[partition] %s [cluster] %s ", memberId, partitionId, clusterId));
}
} else if(partitionCtxt.getObsoleteMember(memberId) != null) {
- if (log.isInfoEnabled()) {
- log.info(String.format("Member is in obsolete list: [member] %s " +
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Member is in obsolete list: [member] %s " +
"[partition] %s [cluster] %s ", memberId, partitionId, clusterId));
}
} //TODO else part
@@ -974,8 +974,8 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
+ "pending and termination pending: %s", memberId));
}
- if (log.isInfoEnabled()) {
- log.info(String.format("Member stat context has been removed successfully: "
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Member stat context has been removed successfully: "
+ "[member] %s", memberId));
}
//Checking whether the cluster state can be changed either from in_active to created/terminating to terminated
@@ -1042,11 +1042,11 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
.getClusterInstanceContext(instanceId);
for (ClusterLevelPartitionContext partitionContext : instanceContext.getPartitionCtxts()) {
- //if (log.isDebugEnabled()) {
- log.info("Starting to terminate all members in cluster [" + getClusterId() + "] Network Partition [ " +
- instanceContext.getNetworkPartitionId() + " ], Partition [ " +
- partitionContext.getPartitionId() + " ]");
- // }
+ if (log.isInfoEnabled()) {
+ log.info("Starting to terminate all members in cluster [" + getClusterId() + "] " +
+ "Network Partition [" + instanceContext.getNetworkPartitionId() + "], Partition [" +
+ partitionContext.getPartitionId() + "]");
+ }
// need to terminate active, pending and obsolete members
//FIXME to traverse concurrent
// active members
@@ -1058,7 +1058,7 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
}
for (String memberId : activeMembers) {
- log.info("Sending instance cleanup for the active member [member id] " + memberId);
+ log.info("Sending instance cleanup event for the active member: [member-id] " + memberId);
partitionContext.moveActiveMemberToTerminationPendingMembers(memberId);
InstanceNotificationPublisher.getInstance().
sendInstanceCleanupEventForMember(memberId);
@@ -1075,8 +1075,9 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
MemberContext pendingMemberCtxt = pendingIterator.next();
// pending members
String memeberId = pendingMemberCtxt.getMemberId();
- log.info("Moving pending member [member id] " + memeberId +
- " obsolete list");
+ if(log.isDebugEnabled()) {
+ log.debug("Moving pending member [member id] " + memeberId + " to obsolete list");
+ }
partitionContext.movePendingMemberToObsoleteMembers(memeberId);
}
@@ -1204,8 +1205,9 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
}
for (String memberId : members) {
// pending members
- log.info("Moving pending member [member id] " + memberId +
- " obsolete list");
+ if(log.isDebugEnabled()) {
+ log.debug("Moving pending member [member id] " + memberId + " the obsolete list");
+ }
partitionContext.movePendingMemberToObsoleteMembers(memberId);
}
}