Я использовал следующую команду: create /test ""
.
Команда Get на 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