stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject [44/50] [abbrv] git commit: stopping notifying parent in Cluster Monitor and Group Monitor if its in Terminating state
Date Thu, 30 Oct 2014 04:14:08 GMT
stopping notifying parent in Cluster Monitor and Group Monitor if its in Terminating state


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

Branch: refs/heads/docker-grouping-merge
Commit: 08d68656f4b81704996761dc4615973f901bfcbc
Parents: b51b0b7
Author: Isuru Haththotuwa <isuruh@apache.org>
Authored: Wed Oct 29 17:53:05 2014 +0530
Committer: Isuru Haththotuwa <isuruh@apache.org>
Committed: Wed Oct 29 17:53:15 2014 +0530

----------------------------------------------------------------------
 .../stratos/autoscaler/monitor/AbstractClusterMonitor.java     | 6 ++++++
 .../apache/stratos/autoscaler/monitor/group/GroupMonitor.java  | 6 ++++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/08d68656/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/AbstractClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/AbstractClusterMonitor.java
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/AbstractClusterMonitor.java
index 1eda837..da4cba8 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/AbstractClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/AbstractClusterMonitor.java
@@ -240,6 +240,12 @@ abstract public class AbstractClusterMonitor extends Monitor implements
Runnable
             if (status == ClusterStatus.Inactive && !this.hasDependent) {
                 log.info("[Cluster] " + clusterId + "is not notifying the parent, " +
                         "since it is identified as the independent unit");
+
+            } else if (status == ClusterStatus.Terminating) {
+                // notify parent
+                log.info("[Cluster] " + clusterId + " is not notifying the parent, " +
+                        "since it is in Terminating State");
+
             } else {
                 MonitorStatusEventBuilder.handleClusterStatusEvent(this.parent, this.status,
this.clusterId);
             }

http://git-wip-us.apache.org/repos/asf/stratos/blob/08d68656/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/group/GroupMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/group/GroupMonitor.java
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/group/GroupMonitor.java
index 55f3b4e..0f213a9 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/group/GroupMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/group/GroupMonitor.java
@@ -152,7 +152,13 @@ public class GroupMonitor extends ParentComponentMonitor implements EventHandler
         if (status == GroupStatus.Inactive && !this.hasDependent) {
             log.info("[Group] " + this.id + "is not notifying the parent, " +
                     "since it is identified as the independent unit");
+
+        } else if (status == GroupStatus.Terminating) {
+            log.info("[Group] " + this.id + " is not notifying the parent, " +
+                    "since it is in Terminating State");
+
         } else {
+            // notify parent
             MonitorStatusEventBuilder.handleGroupStatusEvent(this.parent, this.status, this.id);
         }
         //}


Mime
View raw message