zookeeper 命令

Last updated on November 20, 2024 am

🧙 Questions

☄️ Ideas

连接zookeeper

默认端口号2181

zookeeper-shell.sh 192.168.66.66:2181
zkCli.sh -server ${host}:${port}

zkCli.sh -server isxcode:2181
文件操作
# 查看 / 路径下的文件
ls /
# 创建一个文件
create /ispong_file ispong_data
# 获取文件
get /ispong_file
# 重新设置文件内容
set /ispong_file ispong_new_data
# 删除文件
delete /ispong_file
# 删除所有文件
deleteall /ispong_file
启动命令
zkServer.sh start
zkServer.sh stop
zkServer.sh restart
查看当前节点状态
zkServer.sh status
查看zookeeper端口号
ps -e -o pid,command | grep org.apache.zookeeper.server.quorum.QuorumPeerMain

20221024160800

sudo netstat -nap | grep 1423

20221024160940


zookeeper 命令
https://ispong.isxcode.com/hadoop/zookeeper/zookeeper 命令/
Author
ispong
Posted on
April 1, 2021
Licensed under