Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common commands in zookeeper

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "what are the common commands in zookeeper". In daily operation, I believe many people have doubts about the common commands in zookeeper. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubts about "what are the common commands in zookeeper?" Next, please follow the editor to study!

# create persistent nodes

Create / path / data acl

Acl: get a list of access permissions for nodes. Each node can set access permissions, specifying that only specific clients can access and operate the node.

# create a sequential node

Create-s / path / data

# create a temporary node

Create-e / path / data

# create a child node, just like creating a root node

Create / parent/path/subnode/path / data

# set value

Set / path / data [version]

# get data: (it returns the associated data of znode and the metadata of specified znode)

Get / path

Note: to access the sequential node, you must enter the full path to the znode.

# Monitoring (the monitor will display a notification when the child data of the specified znode or znode changes) the listener will only take effect once

Get / path [watch]

# remove the node, remove the specified znode and recursively all its child nodes

Rmr / path

# Delete a node. If a child node exists, it cannot be deleted

Delete / path [version]

# list children, and you can only view all child nodes at the first level under the specified node

Ls / path [watch]

. View the current node data and see data such as the number of updates

Ls2 / path [watch]

# check status

Stat / path start ZooKeeper server $bin/zkServer.sh start stop ZooKeeper server $bin/zkServer.sh stop view ZK service status $bin/zkServer.sh status restart ZK service $bin/zkServer.sh restart start CLI$ bin/zkCli.sh this is the end of the study on "what are the common zookeeper commands". I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report