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

Switch to Threaded View
Zookeeper >> mail # user >> Active Children nodes?


Copy link to this message
-
Active Children nodes?
Suppose I have this hierarchy in my zookeeper schema. Attached is the
diagram.

And there will be some children for /v1 and /v2 as well.
At some stage, I will be trying to retrieve children of /root parent node.
And depending on whether /v1 is active or /v2 is active, we will retrieve
its children.
Suppose if /v1 is active, then we will retrieve children of v1 and if v2 is
active, then we will retrieve children of v2.

Now I am wondering, how to add this active(ness) as a part of znode?
Meaning how to make sure any one node is active at certain point so that
when I retrieve the children of root, I can tell which version is active
and then get the children of those version (v1 or v2) node

Initially, I was thinking to add some data in /v1 and /v2 node which will
tell us which node is active from v1 and v2.

But is there any other approach that I can use here?