Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # dev >> question about getChildren and queue recipe

Copy link to this message
question about getChildren and queue recipe

I have 2 questions:
- why was it decided not to guarantee any order on the list returned from
getChildren, given that many use-cases require looking on the child with
the smallest id ?
Why not just keep this list in a sorted form on the server ?

-  In the queue recipe (src/recipes/queue), if element() is called twice
we'll always do getChildren twice. Wouldn't
it be better to save the list of children we got from the first element()
call and when going over the list
remove elements from it whenever we see that someone deleted the
corresponding node ?