You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2015/05/14 09:51:57 UTC

[1/3] stratos git commit: fixing recursion issue

Repository: stratos
Updated Branches:
  refs/heads/master 60bdd2fa8 -> bd1918bac


fixing recursion issue


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

Branch: refs/heads/master
Commit: bd1918bac5774dd9b312712698b5a261d50caf4b
Parents: 7deb112
Author: reka <rt...@gmail.com>
Authored: Thu May 14 13:20:09 2015 +0530
Committer: reka <rt...@gmail.com>
Committed: Thu May 14 13:21:45 2015 +0530

----------------------------------------------------------------------
 .../autoscaler/applications/dependency/DependencyTree.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/bd1918ba/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
index 56e9e1d..9520868 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
@@ -160,7 +160,12 @@ public class DependencyTree {
         }
 
         for (ApplicationChildContext context : contexts) {
-            return traverseGraphByLevel(context.getApplicationChildContextList(), parentMonitor, instanceId);
+            List<ApplicationChildContext> contexts1 =
+                    traverseGraphByLevel(context.getApplicationChildContextList(),
+                            parentMonitor, instanceId);
+            if(contexts1 != null && !contexts1.isEmpty()) {
+                return contexts1;
+            }
         }
         return null;
     }


[2/3] stratos git commit: fixing startup order issue with parallel nodes

Posted by re...@apache.org.
fixing startup order issue with parallel nodes


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

Branch: refs/heads/master
Commit: 7deb1127caadb088fd3900c7825975051771bc82
Parents: 8b433aa
Author: reka <rt...@gmail.com>
Authored: Thu May 14 13:02:52 2015 +0530
Committer: reka <rt...@gmail.com>
Committed: Thu May 14 13:21:45 2015 +0530

----------------------------------------------------------------------
 .../autoscaler/applications/dependency/DependencyBuilder.java  | 6 ++++--
 .../autoscaler/applications/dependency/DependencyTree.java     | 6 +++++-
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/7deb1127/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyBuilder.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyBuilder.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyBuilder.java
index df453dc..7d3b59e 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyBuilder.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyBuilder.java
@@ -143,7 +143,9 @@ public class DependencyBuilder {
                                     ApplicationChildContext existingParentContext =
                                             dependencyTree.findParentContextWithId(applicationChildContext.getId());
                                     if ((existingParentContext != null) &&
-                                            (existingParentContext.getId().equals(existingApplicationChildContext.getId()))) {
+                                            (existingApplicationChildContext.getParent()) != null &&
+                                            (existingParentContext.getId().
+                                                    equals(existingApplicationChildContext.getParent().getId()))) {
                                         // Application child context is already available in the dependency tree,
                                         // find its parent element, mark it as the parent element and continue
                                         if (log.isDebugEnabled()) {
@@ -152,7 +154,7 @@ public class DependencyBuilder {
                                                             "and continuing: [dependency-tree] %s",
                                                     existingParentContext.getId(), dependencyTree));
                                         }
-                                        parentContext = existingParentContext;
+                                        parentContext = existingApplicationChildContext;
                                     } else {
                                         String msg = "Startup order is not valid. It contains an element " +
                                                 "which has been defined more than once in another startup order: " +

http://git-wip-us.apache.org/repos/asf/stratos/blob/7deb1127/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
index 693a963..56e9e1d 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
@@ -86,7 +86,11 @@ public class DependencyTree {
         }
         //if not found in the top level search recursively
         for (ApplicationChildContext context : contexts) {
-            return getApplicationChildContextById(id, context.getApplicationChildContextList());
+            ApplicationChildContext childContext = getApplicationChildContextById(id,
+                    context.getApplicationChildContextList());
+            if(childContext != null) {
+                return childContext;
+            }
         }
         return null;
     }


[3/3] stratos git commit: fixing cluster termination only when all the members are removed from the topology

Posted by re...@apache.org.
fixing cluster termination only when all the members are removed from the topology


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

Branch: refs/heads/master
Commit: 8b433aa08c06ed925487c3c87e07da056d035854
Parents: 60bdd2f
Author: reka <rt...@gmail.com>
Authored: Thu May 14 13:02:28 2015 +0530
Committer: reka <rt...@gmail.com>
Committed: Thu May 14 13:21:45 2015 +0530

----------------------------------------------------------------------
 .../processor/cluster/ClusterStatusTerminatedProcessor.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/8b433aa0/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusTerminatedProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusTerminatedProcessor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusTerminatedProcessor.java
index f56a29a..4462888 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusTerminatedProcessor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusTerminatedProcessor.java
@@ -128,7 +128,8 @@ public class ClusterStatusTerminatedProcessor extends ClusterStatusProcessor {
                 if (clusterInstanceContext != null) {
                     for (ClusterLevelPartitionContext partitionContext :
                             clusterInstanceContext.getPartitionCtxts()) {
-                        if (partitionContext.getNonTerminatedMemberCount() > 0) {
+                        if (partitionContext.getTotalMemberCount() > 0 ||
+                                partitionContext.getObsoletedMembers().values().size() > 0) {
                             return true;
                         }
                     }