I recently started working with Python for Zookeeper. I use the library kazoofor Zookeeper.
I have a very simple example of using kazoo for Zookeeper. I have a root node, which is - /root. Now I need to monitor the root of the node /root, and if the new node that is being added to the root node /rootis this /root/testing, then I will only store the clock on the /root/testingnode. I do not want to keep track of any nodes other than testingnode. And then if any new children are added to the /root/testingnode, I will also look at them.
Say a child below this is added -
`/root/testing/test1`
Then I will look at test1node.
Can this be done with Kazoo in Zookeeper? I can only keep track of one Zookeeper node ( /root) using the code below:
import time
from kazoo.client import KazooClient
zk = KazooClient(hosts='127.0.0.1:2181')
zk.start()
while True:
time.sleep(5)
Can someone help me with this in creating a few hours for a child node?
source
share