前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >ZooKeeper 基础9

ZooKeeper 基础9

作者头像
franket
发布2022-03-25 14:24:05
2280
发布2022-03-25 14:24:05
举报
文章被收录于专栏:技术杂记

redo

再次执行之前命令

Tip: 历史命令的保持是在当前会话中,不论此时是否已经成功连接服务

代码语言:javascript
复制
[zk: localhost:2181(CONNECTED) 20] history
10 - ls
11 - ls /
12 - create /test test
13 - get /test
14 - ls /
15 - close 
16 - ls /
17 - connect localhost:2181
18 - ls /
19 - help 
20 - history
[zk: localhost:2181(CONNECTED) 21] redo 11
[test, zookeeper]
[zk: localhost:2181(CONNECTED) 22] redo 15
2015-12-03 16:43:43,109 [myid:] - INFO  [main:ZooKeeper@684] - Session: 0x151665fb7430004 closed
Not connected
[zk: localhost:2181(CLOSED) 23] 2015-12-03 16:43:43,111 [myid:] - INFO  [main-EventThread:ClientCnxn$EventThread@512] - EventThread shut down

[zk: localhost:2181(CLOSED) 23] 
[zk: localhost:2181(CLOSED) 23] redo 17
2015-12-03 16:43:51,288 [myid:] - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@5a4a6010
[zk: localhost:2181(CONNECTING) 24] 2015-12-03 16:43:51,309 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@975] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2015-12-03 16:43:51,311 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@852] - Socket connection established to localhost/127.0.0.1:2181, initiating session
2015-12-03 16:43:51,333 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1235] - Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x151665fb7430005, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null

[zk: localhost:2181(CONNECTED) 24] 

还有一些关于权限管控和监听的命令在以后深入使用过程中再仔细研究


命令汇总

  • wget http://apache.fayea.com/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
  • tar -zxvf zookeeper-3.4.6.tar.gz
  • cd zookeeper-3.4.6
  • grep -v "^#" conf/zoo_sample.cfg
  • cp conf/zoo_sample.cfg conf/zoo.cfg
  • bin/zkServer.sh start
  • netstat -ant | grep 2181
  • bin/zkServer.sh restart
  • bin/zkServer.sh stop
  • bin/zkServer.sh status
  • bin/zkCli.sh

原文地址

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • redo
  • 命令汇总
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档