stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject [33/50] [abbrv] git commit: adding correct log message and refactoring
Date Thu, 30 Oct 2014 04:13:57 GMT
adding correct log message and refactoring


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

Branch: refs/heads/docker-grouping-merge
Commit: ed1af704a37b430f1926a8a39a837935673f2c8f
Parents: d474b13
Author: reka <rthirunavukkarasu23@gmail.com>
Authored: Wed Oct 29 14:23:54 2014 +0530
Committer: reka <rthirunavukkarasu23@gmail.com>
Committed: Wed Oct 29 14:24:15 2014 +0530

----------------------------------------------------------------------
 .../topology/AutoscalerTopologyEventReceiver.java       |  4 ++--
 .../monitor/application/ApplicationMonitor.java         |  2 ++
 .../autoscaler/monitor/cluster/ClusterMonitor.java      |  2 +-
 .../stratos/cloud/controller/iaases/AWSEC2Iaas.java     |  4 ++--
 .../cloud/controller/topology/TopologyBuilder.java      | 12 ++++++------
 .../processor/topology/GroupInActivateProcessor.java    |  2 +-
 6 files changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/ed1af704/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 608100a..ac8b6c9 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
@@ -203,7 +203,7 @@ public class AutoscalerTopologyEventReceiver implements Runnable {
             @Override
             protected void onEvent(Event event) {
 
-                log.info("[ClusterInActivateEvent] Received: " + event.getClass());
+                log.info("[ClusterTerminatingEvent] Received: " + event.getClass());
 
                 ClusterTerminatingEvent clusterTerminatingEvent = (ClusterTerminatingEvent)
event;
                 String appId = clusterTerminatingEvent.getAppId();
@@ -229,7 +229,7 @@ public class AutoscalerTopologyEventReceiver implements Runnable {
             @Override
             protected void onEvent(Event event) {
 
-                log.info("[ClusterInActivateEvent] Received: " + event.getClass());
+                log.info("[ClusterTerminatedEvent] Received: " + event.getClass());
 
                 ClusterTerminatedEvent clusterTerminatedEvent = (ClusterTerminatedEvent)
event;
                 String appId = clusterTerminatedEvent.getAppId();

http://git-wip-us.apache.org/repos/asf/stratos/blob/ed1af704/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/application/ApplicationMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/application/ApplicationMonitor.java
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/application/ApplicationMonitor.java
index a147b35..f6a4d18 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/application/ApplicationMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/application/ApplicationMonitor.java
@@ -25,6 +25,7 @@ import org.apache.stratos.autoscaler.exception.TopologyInConsistentException;
 import org.apache.stratos.autoscaler.grouping.dependency.context.ApplicationContext;
 import org.apache.stratos.autoscaler.monitor.AbstractClusterMonitor;
 import org.apache.stratos.autoscaler.monitor.Monitor;
+import org.apache.stratos.autoscaler.monitor.MonitorStatusEventBuilder;
 import org.apache.stratos.autoscaler.monitor.ParentComponentMonitor;
 import org.apache.stratos.autoscaler.monitor.events.MonitorScalingEvent;
 import org.apache.stratos.autoscaler.monitor.events.MonitorStatusEvent;
@@ -144,6 +145,7 @@ public class ApplicationMonitor extends ParentComponentMonitor {
                 "state changes from %s to %s", id, this.status, status));
         //if(this.status != status) {
             this.status = status;
+
         //}
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/ed1af704/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitor.java
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitor.java
index 69dac23..b47fb15 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitor.java
@@ -77,7 +77,7 @@ public class ClusterMonitor extends AbstractClusterMonitor {
             try {
                 if ((this.status.getCode() <= ClusterStatus.Active.getCode()) ||
                         (this.status == ClusterStatus.Inactive && !hasDependent)
||
-                        this.hasFaultyMember) {
+                        !this.hasFaultyMember) {
                     if (log.isDebugEnabled()) {
                         log.debug("Cluster monitor is running.. " + this.toString());
                     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/ed1af704/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/AWSEC2Iaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/AWSEC2Iaas.java
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/AWSEC2Iaas.java
index a637edc..3e46e52 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/AWSEC2Iaas.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/AWSEC2Iaas.java
@@ -99,7 +99,7 @@ public class AWSEC2Iaas extends Iaas {
            templateBuilder.locationId(iaasInfo.getType());
         }
 
-        if(iaasInfo.getProperty(CloudControllerConstants.AVAILABILITY_ZONE) != null) {
+        /*if(iaasInfo.getProperty(CloudControllerConstants.AVAILABILITY_ZONE) != null) {
             Set<? extends Location> locations = iaasInfo.getComputeService().listAssignableLocations();
             for(Location location : locations) {
                 if(location.getScope().toString().equalsIgnoreCase(CloudControllerConstants.ZONE_ELEMENT)
&&
@@ -110,7 +110,7 @@ public class AWSEC2Iaas extends Iaas {
                     break;
                 }
             }
-        }
+        }*/
 
 		if (iaasInfo.getProperty(CloudControllerConstants.INSTANCE_TYPE) != null) {
 			// set instance type eg: m1.large

http://git-wip-us.apache.org/repos/asf/stratos/blob/ed1af704/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyBuilder.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyBuilder.java
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyBuilder.java
index fac6671..b6e3470 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyBuilder.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyBuilder.java
@@ -665,7 +665,7 @@ public class TopologyBuilder {
             //cluster.setStatus(Status.Activated);
             cluster.setStatus(ClusterStatus.Active);
 
-            log.info("Cluster activated adding status started");
+            log.info("Cluster activated adding status started for" + cluster.getClusterId());
 
             TopologyManager.updateTopology(topology);
         } finally {
@@ -703,7 +703,7 @@ public class TopologyBuilder {
             //cluster.setStatus(Status.Activated);
             cluster.setStatus(ClusterStatus.Inactive);
 
-            log.info("Cluster in-active adding status started");
+            log.info("Cluster in-active adding status started for " + cluster.getClusterId());
 
             TopologyManager.updateTopology(topology);
         } finally {
@@ -737,7 +737,7 @@ public class TopologyBuilder {
         try {
             TopologyManager.acquireWriteLock();
             group.setStatus(GroupStatus.Active);
-            log.info("Group activated adding status started");
+            log.info("Group activated adding status started for " + group.getUniqueIdentifier());
 
             TopologyManager.updateTopology(topology);
         } finally {
@@ -985,7 +985,7 @@ public class TopologyBuilder {
         try {
             TopologyManager.acquireWriteLock();
             group.setStatus(GroupStatus.Inactive);
-            log.info("Group in-active adding status started");
+            log.info("Group in-active adding status started for" + group.getUniqueIdentifier());
 
             TopologyManager.updateTopology(topology);
         } finally {
@@ -1020,7 +1020,7 @@ public class TopologyBuilder {
         try {
             TopologyManager.acquireWriteLock();
             group.setStatus(GroupStatus.Terminated);
-            log.info("Group activated adding status started");
+            log.info("Group activated adding status started for" + group.getUniqueIdentifier());
 
             TopologyManager.updateTopology(topology);
         } finally {
@@ -1054,7 +1054,7 @@ public class TopologyBuilder {
         try {
             TopologyManager.acquireWriteLock();
             group.setStatus(GroupStatus.Terminating);
-            log.info("Group activated adding status started");
+            log.info("Group activated adding status started for " + group.getUniqueIdentifier());
 
             TopologyManager.updateTopology(topology);
         } finally {

http://git-wip-us.apache.org/repos/asf/stratos/blob/ed1af704/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/GroupInActivateProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/GroupInActivateProcessor.java
b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/GroupInActivateProcessor.java
index 094196b..d5dcd65 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/GroupInActivateProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/GroupInActivateProcessor.java
@@ -95,7 +95,7 @@ public class GroupInActivateProcessor extends MessageProcessor {
         } else {
             group.setStatus(GroupStatus.Inactive);
             if (log.isInfoEnabled()) {
-                log.info(String.format("Group updated as activated : %s",
+                log.info(String.format("Group updated as in-activated : %s",
                         group.getUniqueIdentifier()));
             }
         }


Mime
View raw message