1. View the content contained in the current node
ls path
2. Create nodes and assign values
create [-s] [-e] path data acl
[-s] [-e]: -s and -e are both optional. -s represents sequential nodes and -e represents temporary nodes. Note that -s and -e can be
used at the same time, and temporary nodes cannot be created anymore. child node.
3. View the directory list under a certain path, which lists more detailed information than the ls command
ls2 /runoob
4. Obtain node data and status information
get path [watch]
5. Modify the data stored in the node
set path data [version]
6. View node status information
stat /runoob
7. Delete node
delete path [version]
8. Check the number of zk connections
netstat -na | grep 2181 | wc -l
9.zk log level adjustment
In zkEnv.sh, manually change the following WARN to INFO export ZOO_LOG4J_PROP=WARN,ROLLINGFILE. Add zookeeper.log.threshold INFO zookeeper.root.logger INFO,ROLLINGFILE
to log4j.properties and restart zk.
10. Connect to zk client
./zkCli.sh -server 10.224.192.101:2181
11. Check the current zk status
./zkServer.sh status
12. View the zk process
ps -ef |grep zookeeper
13. Delete the content under the node
rmr /rmstore/ZKRMStateRoot/RMAppRoot/*
14. View node permissions
getAcl /rmstore/ZKRMStateRoot/RMVersionNode
15.Set node permissions
setAcl /rmstore/ZKRMStateRoot world:anyone:rwcda