hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Holloway <jonathan.hollo...@gmail.com>
Subject Sequence Number Generation With Zookeeper
Date Thu, 05 Aug 2010 22:31:54 GMT
Hi all,

I'm looking at using Zookeeper for distributed sequence number generation.
 What's the best way to do this currently?  Is there a particular recipe
available for this?

My so far involve:
a) Creating a node with PERSISTENT_SEQUENTIAL then deleting it - this gives
me the monotonically increasing number, but the sequence number isn't
b) Storing the sequence number in the data portion of a persistent node -
then updating this (using the version number - aka optimistic locking).  The
problem with this is that under high load I'm assuming there'll be a lot of
contention and hence failures with regards to updates.

What are your thoughts on the above?

Many thanks,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message