junkaixue commented on code in PR #2846: URL: https://github.com/apache/helix/pull/2846#discussion_r1690432962
########## helix-core/src/main/java/org/apache/helix/controller/rebalancer/condition/RebalanceCondition.java: ########## @@ -0,0 +1,5 @@ +package org.apache.helix.controller.rebalancer.condition; + +public interface RebalanceCondition { + boolean shouldPerformRebalance(); Review Comment: I think we need a generic string -> string map for input ? Or directly pass the cache object. Because condition is a piece of code logic but the real computation is happening at runtime with input. ########## helix-core/src/main/java/org/apache/helix/controller/rebalancer/condition/RebalanceConditionBuilder.java: ########## @@ -0,0 +1,49 @@ +package org.apache.helix.controller.rebalancer.condition; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.BooleanSupplier; + +public class RebalanceConditionBuilder { Review Comment: Would you like to have different default condition impls? For example, config change based condition, topology change based condition. -- 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: reviews-unsubscr...@helix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org For additional commands, e-mail: reviews-h...@helix.apache.org