tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Distributed Computing > Zookeeper > How to create, get and delete data node values using zkCli

How to create, get and delete data node values using zkCli

Author: Venkata Sudhakar

Apache Zookeeper is an open source distributed coordination service that enables synchronization across a cluster. It provides various services like Naming service, Configuration managemen, Cluster management, Leader election, Locking and synchronization service and Highly reliable data registry.

The below example shows how to create, get and delete data node values using zkCli.

C:\VENKAT\DOWNLOADS\ZOOKEEPER\apache-zookeeper-3.6.2-bin\bin>zkCli.cmd
Connecting to localhost:2181
2021-01-16 05:16:34,903 [myid:] - INFO  [main:Environment@98] - Client
environment:zookeeper.version=3.6.2--803c7f1a12f85978cb049af5e4ef23bd8b688715, built on 09/04/2020 12:44 GMT

[zk: localhost:2181(CONNECTED) 0] create /test_data_node ABCD
Created /test_data_node
[zk: localhost:2181(CONNECTED) 1] get /test_data_node
ABCD
[zk: localhost:2181(CONNECTED) 2] set /test_data_node XYZ
[zk: localhost:2181(CONNECTED) 3] get /test_data_node
XYZ
[zk: localhost:2181(CONNECTED) 4] delete /test_data_node
[zk: localhost:2181(CONNECTED) 5]

 
  


  
bl  br