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

ZooKeeper 基础5

作者头像
franket
发布2022-03-25 11:40:15
2410
发布2022-03-25 11:40:15
举报
文章被收录于专栏:技术杂记

Attribute

Comment

czxid

The zxid of the change that caused this znode to be created.

mzxid

The zxid of the change that last modified this znode.

ctime

The time in milliseconds from epoch when this znode was created.

mtime

The time in milliseconds from epoch when this znode was last modified.

version

The number of changes to the data of this znode.

cversion

The number of changes to the children of this znode.

aversion

The number of changes to the ACL of this znode.

ephemeralOwner

The session id of the owner of this znode if the znode is an ephemeral node. If it is not an ephemeral node, it will be zero.

dataLength

The length of the data field of this znode.

numChildren

The number of children of this znode.

set

设置znode内容

代码语言:javascript
复制
[zk: localhost:2181(CONNECTED) 33] set /abc def
cZxid = 0xa
ctime = Thu Dec 03 14:28:05 CST 2015
mZxid = 0xb
mtime = Thu Dec 03 14:35:59 CST 2015
pZxid = 0xa
cversion = 0
dataVersion = 1
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 3
numChildren = 0
[zk: localhost:2181(CONNECTED) 34] get /abc
def
cZxid = 0xa
ctime = Thu Dec 03 14:28:05 CST 2015
mZxid = 0xb
mtime = Thu Dec 03 14:35:59 CST 2015
pZxid = 0xa
cversion = 0
dataVersion = 1
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 3
numChildren = 0
[zk: localhost:2181(CONNECTED) 35] 

delete

删除znode

Note: / 无法被删除

代码语言:javascript
复制
[zk: localhost:2181(CONNECTED) 35] ls / 
[abc, zookeeper]
[zk: localhost:2181(CONNECTED) 36] delete /
Arguments are not valid : /
[zk: localhost:2181(CONNECTED) 37] delete /abc
[zk: localhost:2181(CONNECTED) 38] ls /
[zookeeper]
[zk: localhost:2181(CONNECTED) 39] 

本文系转载,前往查看

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

本文系转载前往查看

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

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