Hi Satish,
 Most of the sequences (versions of nodes ) and the sequence flags are ints.
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 node
Parent + 1
Remove parent 
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 nothing in
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 by our
> application.  I was thinking about using ZooKeeper instead so I can get rid
> of the database.  My plan was to use the sequential id from ephemeral nodes,
> but looking at the code it appears that this is an int, not a long.  Is
> there any other straightforward way to generate ids using ZooKeeper?
> Thanks,
> Satish

Reply via email to