gpt4 book ai didi

apache-zookeeper - zookeeper cli 如何创建一个空节点?

转载 作者:行者123 更新时间:2023-12-02 14:57:40 24 4
gpt4 key购买 nike

创建命令:

create [-s] [-e] path data 

创建节点时未指定数据字段。可以使用 ZooInspector

enter image description here

enter image description here

最佳答案

我使用了以下命令:create/test ""

获取 zkCli 结果的命令:

[zk: localhost:2181(CONNECTED) 14] get /test

cZxid = 0x4
ctime = Fri Sep 07 09:38:31 IRDT 2018
mZxid = 0x4
mtime = Fri Sep 07 09:38:31 IRDT 2018
pZxid = 0x4
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 0

最后,我下载了 zooInspector 来检查它是如何工作的,并创建了两个 znode:fromcli 和 fromInspector。因此,结果如下:

[zk: localhost:2181(CONNECTED) 20] ls /
[fromInspector, zookeeper, fromcli]
[zk: localhost:2181(CONNECTED) 21] get /fromcli

cZxid = 0x23
ctime = Fri Sep 07 11:11:39 IRDT 2018
mZxid = 0x23
mtime = Fri Sep 07 11:11:39 IRDT 2018
pZxid = 0x23
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 0
[zk: localhost:2181(CONNECTED) 22] get /fromInspector

cZxid = 0x24
ctime = Fri Sep 07 11:12:01 IRDT 2018
mZxid = 0x24
mtime = Fri Sep 07 11:12:01 IRDT 2018
pZxid = 0x24
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 0

enter image description here

enter image description here

关于apache-zookeeper - zookeeper cli 如何创建一个空节点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52215036/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com