Mahadev konar commented on ZOOKEEPER-104:

> in the keepset contructor i changed if (exits) zk.create() to try { 
> zk.create() } (nodeexistsexcpetion ){}

>> Since the set can only be added to by a watcher event, these end up being 
>> semantically the same. I think checking the set first is a little more 
>> efficient, but either way is fine with me.

the problem is that if you see that the node does not exist then you will have 
to create it and the create might fail given that someone else might have added 
the node. in that case the keepset contructor would throw an exception.. thats 
why i did that.

the interrupted exception in truly a bizzare exception in the client library. I 
think we shuld get rid of it sometime. 

> KeptSet: a distributed data stucture backed by the children of a ZooKeeper 
> node
> -------------------------------------------------------------------------------
>                 Key: ZOOKEEPER-104
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-104
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: java client
>            Reporter: Anthony Urso
>            Assignee: Anthony Urso
>            Priority: Minor
>         Attachments: ZOOKEEPER-104.patch, ZOOKEEPER-104.patch, 
> ZOOKEEPER-104.patch
> Here is an implementation of a ZooKeeper backed Java Set. It should be 
> generally useful.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to