bbeaudreault commented on a change in pull request #3536:
URL: https://github.com/apache/hbase/pull/3536#discussion_r679509915



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
##########
@@ -1253,6 +1253,15 @@ default boolean balancer() throws IOException {
    */
   boolean balance() throws IOException;
 
+  /**
+   * Invoke the balancer in dry run mode. Will show plan but not actually move 
any regions.
+   * Can NOT run for various reasons. Check logs.
+   *
+   * @return <code>true</code> if dry run ran, <code>false</code> otherwise.
+   * @throws IOException if a remote or network exception occurs
+   */
+  boolean dryRunBalance() throws IOException;

Review comment:
       Thinking about it more and reading the aspirational semver doc, it seems 
like the "lesser of all evils" is the change that a) doesn't break 
compatibility (all of them), and b) will have the most longevity. We don't want 
to add a method today if we plan to replace it in the "near future".
   
   Given that, if you don't like `dryRunBalancer`, I would vote for 
BalancerConfig. We know that we want to add support for config overrides, and 
it'd be awkward to add that aside an enum or boolean.
   
   I personally actually prefer `dryRunBalancer` because unlike `boolean 
force`, it feels like a distinct mode from the normal balancer and we might 
iterate on it over time separately from the normal balancer. For instance we 
might add return values that differ from what the normal balancer will ever 
return, arguments that don't make sense for the normal balancer, etc.
   
   That said, I'm not a committer so my vote may not be worth that much :) I'd 
be open to doing which ever will get it merged.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to