You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/10/29 13:23:30 UTC

git commit: stopping notifying parent in Cluster Monitor and Group Monitor if its in Terminating state

Repository: stratos
Updated Branches:
  refs/heads/4.0.0-grouping b51b0b793 -> 08d68656f


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/4.0.0-grouping
Commit: 08d68656f4b81704996761dc4615973f901bfcbc
Parents: b51b0b7
Author: Isuru Haththotuwa <is...@apache.org>
Authored: Wed Oct 29 17:53:05 2014 +0530
Committer: Isuru Haththotuwa <is...@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);
         }
         //}