helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lei Xia <l...@apache.org>
Subject Re: Data synch between replicas
Date Tue, 31 Oct 2017 20:42:15 GMT
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).


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

View raw message