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/08/24 00:21:37 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #431: Refine the WAGED rebalancer related interfaces for integration

jiajunwang commented on a change in pull request #431: Refine the WAGED rebalancer related interfaces for integration
URL: https://github.com/apache/helix/pull/431#discussion_r317335698
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/controller/rebalancer/GlobalRebalancer.java
 ##########
 @@ -49,19 +52,29 @@ public RebalanceFailureReason(RebalanceFailureType type, String reason) {
       _reason = reason;
     }
 
-    public RebalanceFailureType get_type() {
+    public RebalanceFailureType getType() {
       return _type;
     }
 
-    public String get_reason() {
+    public String getReason() {
       return _reason;
     }
   }
 
-  void init(HelixManager manager);
-
-  Map<String, IdealState> computeNewIdealState(final CurrentStateOutput currentStateOutput,
-      T clusterData, Map<String, Resource> resourceMap);
+  /**
+   * Compute the new IdealStates for all the resources input. The IdealStates include both the new
+   * partition assignment (in the listFiles) and the new replica state mapping (in the mapFields).
+   *
+   * @param clusterData        The Cluster status data provider.
+   * @param resourceMap        A map containing all the rebalancing resources.
+   * @param currentStateOutput The present Current State of the cluster.
+   * @return A map containing the computed new IdealStates.
+   */
+  Map<String, IdealState> computeNewIdealStates(T clusterData, Map<String, Resource> resourceMap,
+      final CurrentStateOutput currentStateOutput);
 
+  /**
+   * @return Details of the rebalance failure. Null if the computing is done successfully.
+   */
   RebalanceFailureReason getFailureReason();
 
 Review comment:
   It's a good point, allow me to think about it.

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