narendly commented on a change in pull request #690: Reset the WAGED rebalancer
once the controller newly acquires leadership.
URL: https://github.com/apache/helix/pull/690#discussion_r370754635
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
##########
@@ -187,6 +188,16 @@
private HelixManager _helixManager;
+ // Since the stateful rebalancer needs to be lazily constructed when the
HelixManager instance is
+ // ready, the GenericHelixController is not constructed with a stateful
rebalancer. This wrapper
+ // is to avoid the complexity of handling a nullable value in the event
handling process.
+ private final StatefulRebalancerRef _rebalancerRef = new
StatefulRebalancerRef() {
+ @Override
+ protected StatefulRebalancer createRebalancer(HelixManager helixManager) {
+ return new WagedRebalancer(helixManager);
+ }
Review comment:
Could we add a TODO here for making it configurable (based on ClusterConfig
for example) in the future as we have different versions of stateful
rebalancers?
Ideally we won't have to import WagedRebalancer explicitly (which seems like
we're creating a dependency between **Generic**HelixController and a specific
rebalancer class). I'm fine with creating an issue and getting to it later.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]