147k views
2 votes
Which two are valid watches for ZNodes in ZooKeeper?

A. NodeChildrenChanged
B. NodeDeleted
C. NodeRefreshed
D. NodeExpired

User Wharfdale
by
7.5k points

1 Answer

6 votes

Final answer:

The two valid ZooKeeper watches for ZNodes are NodeChildrenChanged, which notifies changes in the znode's children, and NodeDeleted, which alerts when the znode itself is deleted.

Step-by-step explanation:

The two valid watches for ZNodes in ZooKeeper are A. NodeChildrenChanged and B. NodeDeleted. ZooKeeper supports several types of watches that allow clients to receive notifications about changes to the ZooKeeper tree. A watch is an one-time trigger sent to ZooKeeper clients that have set a watch on a znode. When a specified event occurs, the watch is triggered, and the client receives a packet explaining the change.

NodeChildrenChanged is triggered when the children of a watched znode are added or removed, whereas NodeDeleted is triggered when the watched znode itself is deleted. The other two options, C. NodeRefreshed and D. NodeExpired, are not standard ZooKeeper watches.

User Provash
by
6.9k points