You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by sa...@apache.org on 2014/09/30 17:20:03 UTC
[1/2] git commit: logging - using specific cluster monitor names
Repository: stratos
Updated Branches:
refs/heads/master 1c1e9ad7c -> 7533adbc4
logging - using specific cluster monitor names
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/94d719d8
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/94d719d8
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/94d719d8
Branch: refs/heads/master
Commit: 94d719d8fa0fba44f86c983cb48b507f68b580fc
Parents: 4ed3cda
Author: R-Rajkumar <rr...@gmail.com>
Authored: Tue Sep 30 20:14:29 2014 +0530
Committer: R-Rajkumar <rr...@gmail.com>
Committed: Tue Sep 30 20:14:29 2014 +0530
----------------------------------------------------------------------
.../topology/AutoscalerTopologyEventReceiver.java | 6 +++---
.../autoscaler/monitor/ClusterMonitorFactory.java | 6 +++---
.../autoscaler/monitor/DockerServiceClusterMonitor.java | 12 ++++++------
.../stratos/autoscaler/monitor/VMLbClusterMonitor.java | 12 ++++++------
.../autoscaler/monitor/VMServiceClusterMonitor.java | 12 ++++++------
5 files changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/94d719d8/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyEventReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyEventReceiver.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyEventReceiver.java
index cb16768..4c896fe 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyEventReceiver.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyEventReceiver.java
@@ -551,19 +551,19 @@ public class AutoscalerTopologyEventReceiver implements Runnable {
success = true;
clusterMonitorType = monitor.getClusterType().name();
} catch (PolicyValidationException e) {
- String msg = clusterMonitorType +" monitor creation failed for cluster: " + cluster.getClusterId();
+ String msg = "Cluster monitor creation failed for cluster: " + cluster.getClusterId();
log.debug(msg, e);
retries--;
} catch (PartitionValidationException e) {
- String msg = clusterMonitorType +" monitor creation failed for cluster: " + cluster.getClusterId();
+ String msg = "Cluster monitor creation failed for cluster: " + cluster.getClusterId();
log.debug(msg, e);
retries--;
}
} while (!success && retries != 0);
if (monitor == null) {
- String msg = clusterMonitorType +" monitor creation failed, even after retrying for 5 times, "
+ String msg = "Cluster monitor creation failed, even after retrying for 5 times, "
+ "for cluster: " + cluster.getClusterId();
log.error(msg);
throw new RuntimeException(msg);
http://git-wip-us.apache.org/repos/asf/stratos/blob/94d719d8/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ClusterMonitorFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ClusterMonitorFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ClusterMonitorFactory.java
index 156b6d2..70198de 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ClusterMonitorFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ClusterMonitorFactory.java
@@ -161,7 +161,7 @@ public class ClusterMonitorFactory {
// hasPrimary is true if there are primary members available in that cluster
clusterMonitor.setHasPrimary(Boolean.parseBoolean(cluster.getProperties().getProperty(Constants.IS_PRIMARY)));
- log.info("Cluster monitor created: "+clusterMonitor.toString());
+ log.info("VMServiceClusterMonitor created: "+clusterMonitor.toString());
return clusterMonitor;
}
@@ -289,7 +289,7 @@ public class ClusterMonitorFactory {
clusterMonitor.addNetworkPartitionCtxt(networkPartitionContext);
}
- log.info("LB Cluster monitor created: "+clusterMonitor.toString());
+ log.info("VMLbClusterMonitor created: "+clusterMonitor.toString());
return clusterMonitor;
}
@@ -346,7 +346,7 @@ public class ClusterMonitorFactory {
// // hasPrimary is true if there are primary members available in that cluster
// dockerClusterMonitor.setHasPrimary(Boolean.parseBoolean(props.getProperty(Constants.IS_PRIMARY)));
- log.info("Docker cluster monitor created: "+ dockerClusterMonitor.toString());
+ log.info("KubernetesServiceClusterMonitor created: "+ dockerClusterMonitor.toString());
return dockerClusterMonitor;
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/94d719d8/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/DockerServiceClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/DockerServiceClusterMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/DockerServiceClusterMonitor.java
index 11de751..402e6b1 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/DockerServiceClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/DockerServiceClusterMonitor.java
@@ -44,19 +44,19 @@ public final class DockerServiceClusterMonitor extends ContainerClusterMonitor{
while (!isDestroyed()) {
if (log.isDebugEnabled()) {
- log.debug("Kubernetes cluster monitor is running.. " + this.toString());
+ log.debug("KubernetesServiceClusterMonitor is running.. " + this.toString());
}
try {
if (!ClusterStatus.In_Maintenance.equals(getStatus())) {
monitor();
} else {
if (log.isDebugEnabled()) {
- log.debug("Kubernetes cluster monitor is suspended as the cluster is in "
+ log.debug("KubernetesServiceClusterMonitor is suspended as the cluster is in "
+ ClusterStatus.In_Maintenance + " mode......");
}
}
} catch (Exception e) {
- log.error("Kubernetes cluster monitor: Monitor failed." + this.toString(),
+ log.error("KubernetesServiceClusterMonitor : Monitor failed." + this.toString(),
e);
}
try {
@@ -123,7 +123,7 @@ public final class DockerServiceClusterMonitor extends ContainerClusterMonitor{
getScaleCheckKnowledgeSession().dispose();
setDestroyed(true);
if(log.isDebugEnabled()) {
- log.debug("DockerClusterMonitor Drools session has been disposed. "+this.toString());
+ log.debug("KubernetesServiceClusterMonitor Drools session has been disposed. "+this.toString());
}
}
@@ -134,13 +134,13 @@ public final class DockerServiceClusterMonitor extends ContainerClusterMonitor{
int monitorInterval = conf.getInt(AutoScalerConstants.AUTOSCALER_MONITOR_INTERVAL, 90000);
setMonitorInterval(monitorInterval);
if (log.isDebugEnabled()) {
- log.debug("Kubernetes Cluster Monitor task interval: " + getMonitorInterval());
+ log.debug("KubernetesServiceClusterMonitor task interval: " + getMonitorInterval());
}
}
@Override
public String toString() {
- return "DockerClusterMonitor "
+ return "KubernetesServiceClusterMonitor "
+ "[ kubernetesHostClusterId=" + getKubernetesClusterCtxt().getKubernetesClusterID()
+ ", clusterId=" + getClusterId()
+ ", serviceId=" + getServiceId() + "]";
http://git-wip-us.apache.org/repos/asf/stratos/blob/94d719d8/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/VMLbClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/VMLbClusterMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/VMLbClusterMonitor.java
index 666fa75..f547cb1 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/VMLbClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/VMLbClusterMonitor.java
@@ -56,19 +56,19 @@ public class VMLbClusterMonitor extends VMClusterMonitor{
while (!isDestroyed()) {
if (log.isDebugEnabled()) {
- log.debug("Cluster monitor is running.. "+this.toString());
+ log.debug("VMLbClusterMonitor is running.. "+this.toString());
}
try {
if( !ClusterStatus.In_Maintenance.equals(getStatus())) {
monitor();
} else {
if (log.isDebugEnabled()) {
- log.debug("LB Cluster monitor is suspended as the cluster is in " +
+ log.debug("VMLbClusterMonitor is suspended as the cluster is in " +
ClusterStatus.In_Maintenance + " mode......");
}
}
} catch (Exception e) {
- log.error("Cluster monitor: Monitor failed. "+this.toString(), e);
+ log.error("VMLbClusterMonitor : Monitor failed. "+this.toString(), e);
}
try {
Thread.sleep(getMonitorInterval());
@@ -114,7 +114,7 @@ public class VMLbClusterMonitor extends VMClusterMonitor{
getMinCheckKnowledgeSession().dispose();
setDestroyed(true);
if(log.isDebugEnabled()) {
- log.debug("LbClusterMonitor Drools session has been disposed. "+this.toString());
+ log.debug("VMLbClusterMonitor Drools session has been disposed. "+this.toString());
}
}
@@ -124,12 +124,12 @@ public class VMLbClusterMonitor extends VMClusterMonitor{
int monitorInterval = conf.getInt(AutoScalerConstants.AUTOSCALER_MONITOR_INTERVAL, 90000);
setMonitorInterval(monitorInterval);
if (log.isDebugEnabled()) {
- log.debug("LbClusterMonitor task interval: " + getMonitorInterval());
+ log.debug("VMLbClusterMonitor task interval: " + getMonitorInterval());
}
}
@Override
public String toString() {
- return "LbClusterMonitor [clusterId=" + getClusterId() + ", serviceId=" + getServiceId() + "]";
+ return "VMLbClusterMonitor [clusterId=" + getClusterId() + ", serviceId=" + getServiceId() + "]";
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/94d719d8/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/VMServiceClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/VMServiceClusterMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/VMServiceClusterMonitor.java
index ed98859..9e97e19 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/VMServiceClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/VMServiceClusterMonitor.java
@@ -70,19 +70,19 @@ public class VMServiceClusterMonitor extends VMClusterMonitor {
while (!isDestroyed()) {
if (log.isDebugEnabled()) {
- log.debug("Cluster monitor is running.. " + this.toString());
+ log.debug("VMServiceClusterMonitor is running.. " + this.toString());
}
try {
if(!ClusterStatus.In_Maintenance.equals(getStatus())) {
monitor();
} else {
if (log.isDebugEnabled()) {
- log.debug("Cluster monitor is suspended as the cluster is in " +
+ log.debug("VMServiceClusterMonitor is suspended as the cluster is in " +
ClusterStatus.In_Maintenance + " mode......");
}
}
} catch (Exception e) {
- log.error("Cluster monitor: Monitor failed." + this.toString(), e);
+ log.error("VMServiceClusterMonitor : Monitor failed." + this.toString(), e);
}
try {
Thread.sleep(getMonitorInterval());
@@ -191,7 +191,7 @@ public class VMServiceClusterMonitor extends VMClusterMonitor {
int monitorInterval = conf.getInt(AutoScalerConstants.AUTOSCALER_MONITOR_INTERVAL, 90000);
setMonitorInterval(monitorInterval);
if (log.isDebugEnabled()) {
- log.debug("Cluster Monitor task interval: " + getMonitorInterval());
+ log.debug("VMServiceClusterMonitor task interval: " + getMonitorInterval());
}
}
@@ -201,13 +201,13 @@ public class VMServiceClusterMonitor extends VMClusterMonitor {
getScaleCheckKnowledgeSession().dispose();
setDestroyed(true);
if(log.isDebugEnabled()) {
- log.debug("Cluster Monitor Drools session has been disposed. "+this.toString());
+ log.debug("VMServiceClusterMonitor Drools session has been disposed. "+this.toString());
}
}
@Override
public String toString() {
- return "ClusterMonitor [clusterId=" + getClusterId() + ", serviceId=" + getServiceId() +
+ return "VMServiceClusterMonitor [clusterId=" + getClusterId() + ", serviceId=" + getServiceId() +
", deploymentPolicy=" + deploymentPolicy + ", autoscalePolicy=" + autoscalePolicy +
", lbReferenceType=" + lbReferenceType +
", hasPrimary=" + hasPrimary + " ]";
[2/2] git commit: Merge branch 'master' of
https://github.com/R-Rajkumar/stratos. This closes #74
Posted by sa...@apache.org.
Merge branch 'master' of https://github.com/R-Rajkumar/stratos. This closes #74
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/7533adbc
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/7533adbc
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/7533adbc
Branch: refs/heads/master
Commit: 7533adbc4facffe7ccdbe0863ca3898326340ee3
Parents: 1c1e9ad 94d719d
Author: sajhak <sa...@gmail.com>
Authored: Tue Sep 30 20:48:27 2014 +0530
Committer: sajhak <sa...@gmail.com>
Committed: Tue Sep 30 20:49:29 2014 +0530
----------------------------------------------------------------------
.../topology/AutoscalerTopologyEventReceiver.java | 6 +++---
.../autoscaler/monitor/ClusterMonitorFactory.java | 6 +++---
.../autoscaler/monitor/DockerServiceClusterMonitor.java | 12 ++++++------
.../stratos/autoscaler/monitor/VMLbClusterMonitor.java | 12 ++++++------
.../autoscaler/monitor/VMServiceClusterMonitor.java | 12 ++++++------
5 files changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------