Github user Nakomis commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/25#discussion_r14828879
--- 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 --
The logic is reversed, so it until the node starts rebalancing, then waits
for it to stop rebalancing
---
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.
---