Helix does that automatically in SEMI AUTO mode. If you are implementing your own rebalancer, take a look at the SemiAutoRebalancer code in Helix.
On Mon, Jun 6, 2016 at 10:00 PM, Neutron sharc <[email protected]> wrote: > Hi Lei, > > At the time a participant dies, it owns some master/slave partitions. > How to convert those partitions to "OFFLINE", given that the > participant already died and no one is running the state machine for > those partitions. Thanks. > > -Neutron > > On Mon, Jun 6, 2016 at 11:04 AM, Lei Xia <[email protected]> > wrote: > > Hi, Neutron > > > > Could you be more specific on your question? In semi-auto mode, you > (the > > client) will specify a preference list for each partition (or Helix can > > generate the list for you too by calling admin.rebalance()). The list is > > fixed, i,e Helix will not automatically recalculate the list. > > > > Given a preference list for a partitions, for example: > > > > { p0: [node-1, node-2, node-3]. ...} > > > > Helix will try to bring p0 to online state for node 1,2,3. If node-1 > is > > disconnected from zookeeper (crashed, for example), the state of p0 on > > node-1 will be offline. Once node-1 comes back, Helix will bring p0 on > > node-1 back from offline to online. > > > > Not sure if this answers your question. > > > > > > Thanks > > Lei > > > > > > On Fri, Jun 3, 2016 at 2:55 PM, Neutron sharc <[email protected]> > > wrote: > > > >> Hi the team, > >> > >> semi-auto mode supports a feature that, after a failed participant > >> comes back online, its owned replicas will be reused again (transit > >> from offline to slave etc). How can Helix recognize the replicas that > >> are owned by a participant after it reconnects after a failure? We > >> are trying to build such a feature in a user-defined rebalancer. You > >> input is highly appreciated. > >> > >> > >> -neutron > >> > > > > > > > > -- > > > > *Lei Xia *Senior Software Engineer > > Distributed Data Systems/Nuage & Helix > > LinkedIn > > > > [email protected] > > www.linkedin.com/in/lxia1 >
