helix icon indicating copy to clipboard operation
helix copied to clipboard

Imprecise param name on the rebalance API in HelixAdmin

Open Lincong opened this issue 3 years ago • 3 comments

Describe the bug

A clear and concise description of what the bug is. The rebalance method on the HelixAdmin is:

  /**
   * Rebalance a resource in cluster
   * @param clusterName
   * @param resourceName
   * @param replica
   */
  void rebalance(String clusterName, String resourceName, int replica);

The last param is int replica. It'd be more precise to name it replicaNum or replicaCount since int replica is ambiguous since it could mean replica ID etc. In addition, please consider adding accurate description of params to its Java doc.

To Reproduce

Steps to reproduce the behavior.

Expected behavior

A clear and concise description of what you expected to happen.

Additional context

Add any other context about the problem here.

Lincong avatar Sep 20 '21 21:09 Lincong

Thanks @Lincong - this is good feedback. Feel free to make a Pull Request yourself. Otherwise, we could also pick this up sometime.

narendly avatar Sep 22 '21 14:09 narendly

Thanks @narendly, which branch should I create a PR against?

Lincong avatar Sep 29 '21 18:09 Lincong

@Lincong Master branch should be fine. But remember follow the OR template and steps.

junkaixue avatar Sep 29 '21 22:09 junkaixue

Feel free to reopen it if you have a PR

junkaixue avatar Feb 23 '24 00:02 junkaixue