You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/11/06 23:18:29 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #573: Introduce Dry-run Waged Rebalancer for the verifiers and tests.

jiajunwang commented on a change in pull request #573: Introduce Dry-run Waged Rebalancer for the verifiers and tests.
URL: https://github.com/apache/helix/pull/573#discussion_r343379232
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java
 ##########
 @@ -377,8 +385,12 @@ private BestPossibleStateOutput calcBestPossState(ResourceControllerDataProvider
     }
 
     runStage(event, new CurrentStateComputationStage());
+    DryrunWagedRebalancer wagedRebalancer = new DryrunWagedRebalancer(_zkClient.getServers(), cache.getClusterName(),
+        cache.getClusterConfig().getGlobalRebalancePreference());
     // TODO: be caution here, should be handled statelessly.
-    runStage(event, new BestPossibleStateCalcStage());
+    runStage(event, new BestPossibleStateCalcStage(wagedRebalancer));
+
+    wagedRebalancer.close();
 
 Review comment:
   That would be OK, I think. If any exception, we should end the verifier otherwise it might consume all the resources in the loop.
   
   AutoCloseable only works if we use try-with-resource, right? How it can help if we are not using a try-with-resource block?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org