You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2015/01/29 13:14:05 UTC
[1/3] incubator-brooklyn git commit: Couchbase SyncGateway should
support cluster of ONE node
Repository: incubator-brooklyn
Updated Branches:
refs/heads/master 66226030c -> beeb4d8ba
Couchbase SyncGateway should support cluster of ONE node
`IS_IN_CLUSTER` [is ONLY set when a server is explicitly added into a cluster](https://github.com/apache/incubator-brooklyn/blob/59208f56a264d85d68ccc51bc9f2acf457dc1107/software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java#L461-L462).
The original logic checks for 'IS_IN_CLUSTER'; this means that the sole primary node of a single-node cluster will never be eligible to be used with sync gateway (even though it actually is...!).
We extend the boolean condition to check for this condition.
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/72b13293
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/72b13293
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/72b13293
Branch: refs/heads/master
Commit: 72b13293f13d0e39c3c480967ef9b498f20f50e9
Parents: 16d0b88
Author: Hok Shun Poon <fu...@googlemail.com>
Authored: Wed Dec 24 20:57:29 2014 +0000
Committer: Hok Shun Poon <fu...@googlemail.com>
Committed: Wed Dec 24 20:57:29 2014 +0000
----------------------------------------------------------------------
.../nosql/couchbase/CouchbaseSyncGatewaySshDriver.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/72b13293/software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java
----------------------------------------------------------------------
diff --git a/software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java b/software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java
index 3d6104b..19cb2ed 100644
--- a/software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java
+++ b/software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java
@@ -92,10 +92,10 @@ public class CouchbaseSyncGatewaySshDriver extends AbstractSoftwareProcessSshDri
@Override
public boolean apply(@Nullable Entity entity) {
- if (entity instanceof CouchbaseNode && Boolean.TRUE.equals(entity.getAttribute(CouchbaseNode.IS_IN_CLUSTER))) {
- return true;
- }
- return false;
+ // Must either be recognised by a cluster as added, or be the primary node in a cluster of ONE.
+ return entity instanceof CouchbaseNode
+ && (Boolean.TRUE.equals(entity.getAttribute(entity.IS_IN_CLUSTER))
+ || Boolean.TRUE.equals(entity.getAttribute(entity.IS_PRIMARY_NODE)));
}
});
if (cbClusterNode.isPresent()) {
@@ -172,5 +172,4 @@ public class CouchbaseSyncGatewaySshDriver extends AbstractSoftwareProcessSshDri
return arch + fileExtension;
}
}
-
-}
\ No newline at end of file
+}
[3/3] incubator-brooklyn git commit: fix minor compile error so we
can merge #427
Posted by he...@apache.org.
fix minor compile error so we can merge #427
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/beeb4d8b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/beeb4d8b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/beeb4d8b
Branch: refs/heads/master
Commit: beeb4d8baa241049de20669e30c73be73774b0f8
Parents: 932f9ff
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Thu Jan 29 12:13:29 2015 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Thu Jan 29 12:13:29 2015 +0000
----------------------------------------------------------------------
.../entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/beeb4d8b/software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java
----------------------------------------------------------------------
diff --git a/software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java b/software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java
index 19cb2ed..164f60a 100644
--- a/software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java
+++ b/software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java
@@ -94,8 +94,8 @@ public class CouchbaseSyncGatewaySshDriver extends AbstractSoftwareProcessSshDri
public boolean apply(@Nullable Entity entity) {
// Must either be recognised by a cluster as added, or be the primary node in a cluster of ONE.
return entity instanceof CouchbaseNode
- && (Boolean.TRUE.equals(entity.getAttribute(entity.IS_IN_CLUSTER))
- || Boolean.TRUE.equals(entity.getAttribute(entity.IS_PRIMARY_NODE)));
+ && (Boolean.TRUE.equals(entity.getAttribute(CouchbaseNode.IS_IN_CLUSTER))
+ || Boolean.TRUE.equals(entity.getAttribute(CouchbaseNode.IS_PRIMARY_NODE)));
}
});
if (cbClusterNode.isPresent()) {
@@ -172,4 +172,5 @@ public class CouchbaseSyncGatewaySshDriver extends AbstractSoftwareProcessSshDri
return arch + fileExtension;
}
}
-}
+
+}
\ No newline at end of file
[2/3] incubator-brooklyn git commit: This closes #427
Posted by he...@apache.org.
This closes #427
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/932f9ff1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/932f9ff1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/932f9ff1
Branch: refs/heads/master
Commit: 932f9ff1e535e62176e5ac09c9b9218bd8e2e22b
Parents: 6622603 72b1329
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Thu Jan 29 12:10:38 2015 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Thu Jan 29 12:10:38 2015 +0000
----------------------------------------------------------------------
.../nosql/couchbase/CouchbaseSyncGatewaySshDriver.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------