Have zookeeper sequential number continuous since 3.4.x? -


in project, need latest sequential number without children nodes, because there many children nodes.

acording this answer , confirmed experiments, since zookeeper 3.4 sequential znodes numbered parent's persistedstat.cversion number, stores number of znodes created under it. can calculate number querying parent znode stat , applying following formula:

persistedstat.cversion = (znodestat.cversion + znodestat.numchildren) /2

that way, don't need use get_children() discover number of last created znode.


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -