Thanks mahadev, that's a simple and elegant solution. I feel pretty
dumb not thinking of it myself! :( it should be very straightforward
to implement too. We were using a database to store blobs and to
generate ids. I replaced the blob storage with hadoop hdfs and the ids
with zookeeper. Nice work you hadoop guys! :)
Sent from my iPhone
On Apr 23, 2009, at 5:26 PM, Mahadev Konar <maha...@yahoo-inc.com>
Most of the sequences (versions of nodes ) and the sequence flags
We do have plans to move it to long.
But in your case I can imagine you can split a long into 2 32 bits -
Parent (which is int) -> child(which is int)
Now after you run out of child epehemarls then you should create a
Parent + 1
And then start creating an ephemeral child
(so parent (32 bits) and child (32 bits)) would form a long.
I don't think this should be very hard to implement. Their is
zookeeper (out of the box) currently that would help you out.
On 4/23/09 4:52 PM, "Satish Bhatti" <cthd2...@gmail.com> wrote:
We currently use a database sequence to generate unique ids for use
application. I was thinking about using ZooKeeper instead so I can
of the database. My plan was to use the sequential id from
but looking at the code it appears that this is an int, not a
there any other straightforward way to generate ids using ZooKeeper?