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 2014/12/08 12:05:52 UTC
stratos git commit: fixing termination dependency calculation
Repository: stratos
Updated Branches:
refs/heads/master 9673d5a30 -> d26e6c8fc
fixing termination dependency calculation
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d26e6c8f
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d26e6c8f
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d26e6c8f
Branch: refs/heads/master
Commit: d26e6c8fce16f23789b1a2365bd550f6fb8c31a7
Parents: 9673d5a
Author: reka <rt...@gmail.com>
Authored: Mon Dec 8 16:35:34 2014 +0530
Committer: reka <rt...@gmail.com>
Committed: Mon Dec 8 16:35:34 2014 +0530
----------------------------------------------------------------------
.../applications/dependency/DependencyTree.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/d26e6c8f/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 8ca1733..1f86ca4 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
@@ -204,6 +204,11 @@ public class DependencyTree {
//finding all the children of the found application context
findAllChildrenOfAppContext(applicationContext.getApplicationChildContextList(),
allChildrenOfAppContext);
+ //If only particular cluster, then no need to terminated it.
+ if(allChildrenOfAppContext.size() > 0) {
+ //adding the terminated one to the list
+ allChildrenOfAppContext.add(applicationContext);
+ }
return allChildrenOfAppContext;
} else if (getTerminationBehavior() == TerminationBehavior.TERMINATE_ALL) {
//killall will be killed by the monitor from it's list.
@@ -211,11 +216,6 @@ public class DependencyTree {
allChildrenOfAppContext);
}
- //If only particular cluster, then no need to terminated it.
- if(allChildrenOfAppContext.size() > 0) {
- //adding the terminated one to the list
- allChildrenOfAppContext.add(applicationContext);
- }
//return empty for the kill-none case, what ever returns here will be killed in
return allChildrenOfAppContext;
}