mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
2.7 KiB
2.7 KiB
machine_translated | machine_translated_rev |
---|---|
true | 5decc73b5d |
系统。动物园管理员
如果未配置ZooKeeper,则表不存在。 允许从配置中定义的ZooKeeper集群读取数据。 查询必须具有 ‘path’ WHERE子句中的相等条件或者在某个集合中的条件。 这是ZooKeeper中您想要获取数据的孩子的路径。
查询 SELECT * FROM system.zookeeper WHERE path = '/clickhouse'
输出对所有孩子的数据 /clickhouse
节点。
要输出所有根节点的数据,write path= ‘/’.
如果在指定的路径 ‘path’ 不存在,将引发异常。
查询SELECT * FROM system.zookeeper WHERE path IN ('/', '/clickhouse')
输出/
和 /clickhouse
节点上所有子节点的数据。
如果在指定的 ‘path’ 集合中有不存在的路径,将引发异常。
它可以用来做一批ZooKeeper路径查询。
列:
name
(String) — The name of the node.path
(String) — The path to the node.value
(String) — Node value.dataLength
(Int32) — Size of the value.numChildren
(Int32) — Number of descendants.czxid
(Int64) — ID of the transaction that created the node.mzxid
(Int64) — ID of the transaction that last changed the node.pzxid
(Int64) — ID of the transaction that last deleted or added descendants.ctime
(DateTime) — Time of node creation.mtime
(DateTime) — Time of the last modification of the node.version
(Int32) — Node version: the number of times the node was changed.cversion
(Int32) — Number of added or removed descendants.aversion
(Int32) — Number of changes to the ACL.ephemeralOwner
(Int64) — For ephemeral nodes, the ID of the session that owns this node.
示例:
SELECT *
FROM system.zookeeper
WHERE path = '/clickhouse/tables/01-08/visits/replicas'
FORMAT Vertical
Row 1:
──────
name: example01-08-1.yandex.ru
value:
czxid: 932998691229
mzxid: 932998691229
ctime: 2015-03-27 16:49:51
mtime: 2015-03-27 16:49:51
version: 0
cversion: 47
aversion: 0
ephemeralOwner: 0
dataLength: 0
numChildren: 7
pzxid: 987021031383
path: /clickhouse/tables/01-08/visits/replicas
Row 2:
──────
name: example01-08-2.yandex.ru
value:
czxid: 933002738135
mzxid: 933002738135
ctime: 2015-03-27 16:57:01
mtime: 2015-03-27 16:57:01
version: 0
cversion: 37
aversion: 0
ephemeralOwner: 0
dataLength: 0
numChildren: 7
pzxid: 987021252247
path: /clickhouse/tables/01-08/visits/replicas