Erik Holstad commented on ZOOKEEPER-472:

Yes the Jira was originally about not instantiating the HashSet before any 
children where added to the node, so in that case there is only a small reason 
for not having the persistent and the ephemeral nodes the same. For the sorted 
node I'm just using a sortedSet instead of the hashset, so all the set methods 
are still valid to use.

Not really sure how many types of nodes there could be, but we have a use case 
for HBase where this new sorted node would be good.
And in the case of more nodes coming into play it might make sense to have an 
interface of a base class.

Sorry about not being clear.


> Making DataNode not instantiate a HashMap when the node is ephmeral
> -------------------------------------------------------------------
>                 Key: ZOOKEEPER-472
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.1.1, 3.2.0
>            Reporter: Erik Holstad
>            Assignee: Erik Holstad
>            Priority: Minor
>             Fix For: 3.3.0
> Looking at the code, there is an overhead of a HashSet object for that nodes 
> children, even though the node might be an ephmeral node and cannot have 
> children.

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