Re: About ZooKeeper Dynamic Reconfiguration

2019-12-03 Thread Gao,Wei
Hi oo4load,
  I have a question which confuses me quite a long time.
  As is known to us all, ZK servers frequently take snapshots while
processing requests.
When a ZK server replays a snapshot which contains a transaction which has
been executed before this snapshot, the transaction will be executed two
times. However if a version number is specified in the transaction, it will
not match the current version number when replaying the transaction.
  How does ZK server solve this problem?
  Really look forward to your answers!
  Thank you.





--
Sent from: http://zookeeper-user.578899.n2.nabble.com/


Re: About ZooKeeper Dynamic Reconfiguration

2019-10-09 Thread Gao,Wei
Hi Chris,
I received your codes about zookeeper balancer. It seems that there are a
few java class files missing. They include:
nl.ing.profileha.util.EventCreator;
nl.ing.profileha.util.FailsafeTriggeredException;
nl.ing.profileha.util.StringUtils;
nl.ing.profileha.util.Validator;
nl.ing.profileha.util.shell.SystemCommandExecutorWithTimeout;
nl.ing.profileha.zoomonitor.LocalConfig;
nl.ing.profileha.util.httpGetRequester;
ACLMode.java;
ZookeeperTreeCache.java;

Would you please send these class file to me?
Really appreciate for your kindness!
Thanks




--
Sent from: http://zookeeper-user.578899.n2.nabble.com/


Re: About ZooKeeper Dynamic Reconfiguration

2019-10-08 Thread Gao,Wei
Hi oo4load,
  Where did you sent it to? Through this site or directly sent to my email?
I received your pseudo codes last week just like this shown below:

buildDatacenterAndServerModel(configurationFile) {
  enum zookeeperRole PARTICIPANT, OBSERVER, NONE, DOWN
  object datacenter has servers
  object server has zookeeperRole configuredRole, zookeeperRole activeRole
  parse(configurationFile) into (datacenter, servers);
}
shiftMajority(designatedSurvivorDatacenter) {
 
designatedSurvivorDatacenter.someObserver.dynamicReconfigure(server=PARTICIPANT)
  otherDatacenter.someParticipant.dynamicReconfigure(server=OBSERVER)
}
balanceServerRoles() {
  if (designatedSurvivorDatacenter.hasMinimumQuorum)
  someParticipant.dynamicReconfigure(server=OBSERVER)
  if (quorumSize.aboveSafeLimit)
  someObserver.dynamicReconfigure(server=PARTICIPANT)
  //This is a lot more complicated than 2 simple commands, you need an
algorithm or define several scenarios.
}


main() {
 buildDatacenterAndServerModel(configurationFile);
  while (IamLeader) {
parse(zk.getData(“/zookeeper/config”)) into servers.configuredRole;
foreach(server) getServerRole(“server:8081/commands/stat”) into
servers.activeRole;

foreach(server.activeRole=DOWN)  dynamicReconfigure(server=OBSERVER);
  server.setConfiguredRole(OBSERVER);

if(designatedSurvivorDatacenter != datacenter.hasMajority)
   shiftMajority(designatedSurvivorDatacenter);
   balanceServerRoles();
  }
}

If this above is not what you mean, would you please send it again?
Really appreciate for your kindness!





--
Sent from: http://zookeeper-user.578899.n2.nabble.com/


Re: About ZooKeeper Dynamic Reconfiguration

2019-10-08 Thread Gao,Wei
Hi oo4load,
  If it is convenient to you, I would like to get the actual code from you
about the zookeeper cluster balancer implementation. My email address is: 
wei@arcserve.com
Thank you again.



--
Sent from: http://zookeeper-user.578899.n2.nabble.com/


Re: About ZooKeeper Dynamic Reconfiguration

2019-10-07 Thread Gao,Wei
Hi oo4load,
 Would you please sent me the active code of the implementation?
Thank you very much!



--
Sent from: http://zookeeper-user.578899.n2.nabble.com/


Re: About ZooKeeper Dynamic Reconfiguration

2019-10-07 Thread Gao,Wei
Hi oo4load,
 Would you please sent me the active code of the implementation?
Thank you very much!



--
Sent from: http://zookeeper-user.578899.n2.nabble.com/


Re: About ZooKeeper Dynamic Reconfiguration

2019-09-28 Thread Gao,Wei
Hi oo4load,
  If it is convenient to you, I would like to get the actual code from you
about the zookeeper cluster balancer implementation. My email address is:
  */wei@arcserve.com/*
  Thank you again.



--
Sent from: http://zookeeper-user.578899.n2.nabble.com/


Re: About ZooKeeper Dynamic Reconfiguration

2019-09-27 Thread Gao,Wei
Hi oo4load,
  Got it. Thanks a lot!



--
Sent from: http://zookeeper-user.578899.n2.nabble.com/


Re: About ZooKeeper Dynamic Reconfiguration

2019-09-27 Thread Gao,Wei
*Hi oo4load,
  How could we integrate this implementation with ZooKeeper 3.5.5? Does it
mean we have to mix the implementation code into the already released
ZooKeeper 3.5.5 and rebuild it again into another ZooKeeper and re-install
it?
  Thanks.*



--
Sent from: http://zookeeper-user.578899.n2.nabble.com/


Re: About ZooKeeper Dynamic Reconfiguration

2019-09-27 Thread Gao,Wei
Hi oo4load,
  Thank you so much for your reply!
  How I wish I could appreciate your design with actual code!
  Really look forward to hearing from you.



--
Sent from: http://zookeeper-user.578899.n2.nabble.com/


Re: About ZooKeeper Dynamic Reconfiguration

2019-09-26 Thread Gao,Wei
Hi oo4load,
  Could you please tell me how to implements this to avoid the problem
above?
Thanks



--
Sent from: http://zookeeper-user.578899.n2.nabble.com/


About ZooKeeper Dynamic Reconfiguration

2019-08-21 Thread Gao,Wei
Hi
   I encounter a problem which blocks my development of load balance using 
ZooKeeper 3.5.5.
   Actually, I have a ZooKeeper cluster which comprises of five zk servers. And 
the dynamic configuration file is as follows:

  server.1=zk1:2888:3888:participant;0.0.0.0:2181
  server.2=zk2:2888:3888:participant;0.0.0.0:2181
  server.3=zk3:2888:3888:participant;0.0.0.0:2181
  server.4=zk4:2888:3888:participant;0.0.0.0:2181
  server.5=zk5:2888:3888:participant;0.0.0.0:2181

  The zk cluster can work fine if every member works normally. However, if say 
two of them are suddenly down without previously being notified,
the dynamic configuration file shown above will not be synchronized 
dynamically, which leads to the zk cluster fail to work normally.
  I think this is a very common case which may happen at any time. If so, how 
can we resolve it?
  Really look forward to hearing from you!
Thanks