You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@helix.apache.org by leela maheswararao <le...@yahoo.com.INVALID> on 2017/10/27 02:20:22 UTC

Data synch between replicas

Team,Our scenario consist of 1 Master and 2 slaves per partition. Spectator (client) will write to 1 master and 1 slave and we wanted another slave to frequently synch with master at server side. To achieve server - server synch for given partition, we need to know for given partition whether current node acts as 3rd replica. Does helix ensure order of replica is always same for given partition? Also what api exists to know current node replica number for partition it owns?
Thanks in advance,Mahesh




Re: Data synch between replicas

Posted by leela maheswararao <le...@yahoo.com.INVALID>.
Thanks lot Lei.


Sent from Yahoo Mail for iPhone


On Wednesday, November 1, 2017, 2:12 AM, Lei Xia <lx...@apache.org> wrote:

Hi, Leela

  The Master/Slave model does not support that because there is no way
Helix can differeniate two slave replicas unless your application have
customized logic to perform the check.  However, for your case, you can
create your own state model instead of using defaut MasterSlave model.  You
can create a state model with three states,  for example, Master,
PrimarySlave, SecondarySlave, and there is maximal 1 Master and 1
PrimarySlave allowed.

  You can use the MasterSlave model implementation as a sample to implement
your state model (org.apache.helix.model.MasterSlaveSMD) and register the
new model using helix admin API: HelixAdmin.addStateModelDef(String
clusterName, String stateModelDef, StateModelDefinition stateModel).


Thanks
Lei

On Mon, Oct 30, 2017 at 5:48 AM, leela maheswararao <
leela_maheshwar@yahoo.com.invalid> wrote:

> Does anybody got a chance to look into this?
>
>
> On Friday, October 27, 2017, 7:50 AM, leela maheswararao <
> leela_maheshwar@yahoo.com> wrote:
>
> Team,Our scenario consist of 1 Master and 2 slaves per partition.
> Spectator (client) will write to 1 master and 1 slave and we wanted another
> slave to frequently synch with master at server side. To achieve server -
> server synch for given partition, we need to know for given partition
> whether current node acts as 3rd replica. Does helix ensure order of
> replica is always same for given partition? Also what api exists to know
> current node replica number for partition it owns?
> Thanks in advance,Mahesh
>
>
>
>
>
>
>




Re: Data synch between replicas

Posted by Lei Xia <lx...@apache.org>.
Hi, Leela

  The Master/Slave model does not support that because there is no way
Helix can differeniate two slave replicas unless your application have
customized logic to perform the check.  However, for your case, you can
create your own state model instead of using defaut MasterSlave model.  You
can create a state model with three states,  for example, Master,
PrimarySlave, SecondarySlave, and there is maximal 1 Master and 1
PrimarySlave allowed.

  You can use the MasterSlave model implementation as a sample to implement
your state model (org.apache.helix.model.MasterSlaveSMD) and register the
new model using helix admin API: HelixAdmin.addStateModelDef(String
clusterName, String stateModelDef, StateModelDefinition stateModel).


Thanks
Lei

On Mon, Oct 30, 2017 at 5:48 AM, leela maheswararao <
leela_maheshwar@yahoo.com.invalid> wrote:

> Does anybody got a chance to look into this?
>
>
> On Friday, October 27, 2017, 7:50 AM, leela maheswararao <
> leela_maheshwar@yahoo.com> wrote:
>
> Team,Our scenario consist of 1 Master and 2 slaves per partition.
> Spectator (client) will write to 1 master and 1 slave and we wanted another
> slave to frequently synch with master at server side. To achieve server -
> server synch for given partition, we need to know for given partition
> whether current node acts as 3rd replica. Does helix ensure order of
> replica is always same for given partition? Also what api exists to know
> current node replica number for partition it owns?
> Thanks in advance,Mahesh
>
>
>
>
>
>
>

Re: Data synch between replicas

Posted by Lei Xia <lx...@apache.org>.
Hi, Leela

  The Master/Slave model does not support that because there is no way
Helix can differeniate two slave replicas unless your application have
customized logic to perform the check.  However, for your case, you can
create your own state model instead of using defaut MasterSlave model.  You
can create a state model with three states,  for example, Master,
PrimarySlave, SecondarySlave, and there is maximal 1 Master and 1
PrimarySlave allowed.

  You can use the MasterSlave model implementation as a sample to implement
your state model (org.apache.helix.model.MasterSlaveSMD) and register the
new model using helix admin API: HelixAdmin.addStateModelDef(String
clusterName, String stateModelDef, StateModelDefinition stateModel).


Thanks
Lei

On Mon, Oct 30, 2017 at 5:48 AM, leela maheswararao <
leela_maheshwar@yahoo.com.invalid> wrote:

> Does anybody got a chance to look into this?
>
>
> On Friday, October 27, 2017, 7:50 AM, leela maheswararao <
> leela_maheshwar@yahoo.com> wrote:
>
> Team,Our scenario consist of 1 Master and 2 slaves per partition.
> Spectator (client) will write to 1 master and 1 slave and we wanted another
> slave to frequently synch with master at server side. To achieve server -
> server synch for given partition, we need to know for given partition
> whether current node acts as 3rd replica. Does helix ensure order of
> replica is always same for given partition? Also what api exists to know
> current node replica number for partition it owns?
> Thanks in advance,Mahesh
>
>
>
>
>
>
>

Re: Data synch between replicas

Posted by leela maheswararao <le...@yahoo.com.INVALID>.
Does anybody got a chance to look into this?


On Friday, October 27, 2017, 7:50 AM, leela maheswararao <le...@yahoo.com> wrote:

Team,Our scenario consist of 1 Master and 2 slaves per partition. Spectator (client) will write to 1 master and 1 slave and we wanted another slave to frequently synch with master at server side. To achieve server - server synch for given partition, we need to know for given partition whether current node acts as 3rd replica. Does helix ensure order of replica is always same for given partition? Also what api exists to know current node replica number for partition it owns?
Thanks in advance,Mahesh