You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by sjcorbett <gi...@git.apache.org> on 2015/01/05 16:42:12 UTC

[GitHub] incubator-brooklyn pull request: Couchbase SyncGateway should supp...

Github user sjcorbett commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/427#discussion_r22467236
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewaySshDriver.java ---
    @@ -92,10 +92,10 @@ public void launch() {
     
                     @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)));
    --- End diff --
    
    Replace the 'entity' in `entity.IS_IN_CLUSTER` and `entity.IS_PRIMARY_NODE` with `CouchbaseNode`, otherwise this will not compile.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---