Can you share the code? Feel free to IM me on gtalk. On Tue, Oct 16, 2018 at 4:54 AM Rob McKinnon <[email protected]> wrote:
> Kishore or Lei, > > I am wondering if you can comment on my question? I am trying to figure > out if I am understanding the User-Define Rebalancing correctly or is there > an issue with the software. > > > Thanks, > > Rob > > On Wed, Oct 10, 2018 at 2:48 PM Rob McKinnon <[email protected]> > wrote: > >> I was using the "run-helix-controll.sh" script to handle the controller >> and after implementing a custom controller, I am now able to get the >> Rebalancer to be invoked. >> >> I am running into a related issue as the result of my rebalancing doesn't >> seem to have any affect on the cluster. I am assuming that the Rebalance >> functionality affects the external view? In the tutorial example, it looks >> like the currentIdealState preference list is being updated and a variable >> called "assignment" is returned. I did similar things in my implementations >> but I am not seeing any changes to the cluster. 1. Am I understanding this >> correctly? 2. Should I see the changes in the external view? >> >> On Tue, Oct 9, 2018 at 1:02 PM kishore g <[email protected]> wrote: >> >>> Admin.rebalance method won’t invoke user rebalancer >>> >>> The rebalancer is invoked when ever there is a change in the cluster >>> such as nodes added/started/stopped etc. >>> >>> Also look for error message in the log as Lei suggested. Note the >>> controller should have access to the user defined rebalancer class >>> >>> On Tue, Oct 9, 2018 at 9:46 AM Lei Xia <[email protected]> wrote: >>> >>>> 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 >>>> >>>
