Hi, Rob It seems your rebalancer class is not correctly linked into Helix lib, i.e, Helix can not find your rebalancer class at runtime. Do you see some error log from Helix like: ""Exception while invoking custom rebalancer class:"?
On Mon, Oct 8, 2018 at 5:37 AM Rob McKinnon <[email protected]> wrote: > I am working through the tutorial on the User-Defined Rebalancing and I am > not able to get my Rebalancer to be invoked. > > Sample Code > ====== > > public static void main(String[] args) { > ZKHelixAdmin admin = new ZKHelixAdmin(Conf.ZK_ADDRESS); > > IdealState idealState = admin.getResourceIdealState(Conf.CLUSTER_NAME, > Conf.RESOURCE_NAME); > idealState.setRebalanceMode(IdealState.RebalanceMode.USER_DEFINED); > idealState.setRebalancerClassName(MyRebalancer.class.getName()); > admin.setResourceIdealState(Conf.CLUSTER_NAME, Conf.RESOURCE_NAME, > idealState); > > > admin.rebalance(Conf.CLUSTER_NAME, RESOURCE_NAME, NUM_REPLICAS); > } > > ====== > I was expecting that when calling the "admin.rebalance" method, it would > invoke "MyRebalance" code but when I run it "MyRebalance" code was not > invoked. > > > Thanks, > > Rob > -- Lei Xia
