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. |
设置znode内容
[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]
删除znode
Note:
/
无法被删除
[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 删除。