brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [1/2] incubator-brooklyn git commit: Changes DynamicCluster resize behaviour to favour the location defined on the memberspec (if present)
Date Mon, 18 May 2015 15:39:36 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 9c120ac79 -> 99962a12d


Changes DynamicCluster resize behaviour to favour the location defined on the memberspec (if
present)


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

Branch: refs/heads/master
Commit: e10a73c767bc9801bdd96c529a1cbd3c14d2aaf7
Parents: d78c172
Author: Martin Harris <github@nakomis.com>
Authored: Mon May 18 11:13:54 2015 +0100
Committer: Martin Harris <github@nakomis.com>
Committed: Mon May 18 11:13:54 2015 +0100

----------------------------------------------------------------------
 .../main/java/brooklyn/entity/group/DynamicClusterImpl.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e10a73c7/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java b/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
index 43b671c..ab2a21e 100644
--- a/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
+++ b/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
@@ -485,7 +485,11 @@ public class DynamicClusterImpl extends AbstractGroupImpl implements
DynamicClus
                     throw new IllegalStateException("Unexpected condition! cluster="+this+";
member="+member+"; actualMemberLocs="+actualMemberLocs);
                 }
             } else {
-                memberLoc = getLocation();
+                if (getMemberSpec() != null && getMemberSpec().getLocations().size()
> 0) {
+                    memberLoc = getMemberSpec().getLocations().iterator().next();
+                } else {
+                    memberLoc = getLocation();
+                }
             }
 
             Entity replacement = replaceMember(member, memberLoc, ImmutableMap.of());


Mime
View raw message