ZooKeeper's data model and its API support the following nine basic operations:
Let's look at the ZooKeeper operations mentioned in the preceding table using ZooKeeper Java shell:
Create a znode called root with
ThisIsTheRootNode
as its data:[zk: localhost(CONNECTED) 0] create /root "ThisIsTheRootNode" Created /root
Get the content of the just created znode
root
:[zk: localhost(CONNECTED) 1] get /root "ThisIsTheRootNode" …… …… …… ……
Create a child znode
child...