Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/25#discussion_r14664784
--- Diff:
software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseNodeSshDriver.java
---
@@ -175,8 +201,83 @@ public void rebalance() {
.failOnNonZeroResultCode()
.execute();
entity.setAttribute(CouchbaseNode.REBALANCE_STATUS, "Rebalance
Started");
+ // wait until the re-balance is complete
+ Repeater.create()
+ .every(Duration.millis(500))
+ .limitTimeTo(Duration.THIRTY_SECONDS)
+ .until(new Callable<Boolean>() {
+ @Override
+ public Boolean call() throws Exception {
+ for (String nodeHostName :
CouchbaseNodeSshDriver.this.getNodeHostNames()) {
+ if (isNodeRebalancing(nodeHostName)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ })
+ .run();
+ Repeater.create()
--- End diff --
Is this code identical to that above, except for the different timeout?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---