ClickHouse/docs/en/operations/system-tables/zookeeper.md
Anna a6fb067a75
DOCSUP-1915: Split system-table.md into separate files. (#13160)
* Corrected en files

* Split system-tables.md into separate files

* Fixed links.

* Fixed links.

* Fixed links.

* Fixed links.

* Add ref to original article

* Fixed links

* Add toc_folder_title and translate

* Add stack_trace.md, correct toc-title

* Fixed links

* Hypothesis testing

* Hypothesis testing

* Update run.sh, thanks @azat

Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru>
Co-authored-by: Sergei Shtykov <bayonet@yandex-team.ru>
Co-authored-by: alexey-milovidov <milovidov@yandex-team.ru>
2020-08-06 11:50:29 +03:00

2.5 KiB
Raw Blame History

system.zookeeper

The table does not exist if ZooKeeper is not configured. Allows reading data from the ZooKeeper cluster defined in the config. The query must have a path equality condition in the WHERE clause. This is the path in ZooKeeper for the children that you want to get data for.

The query SELECT * FROM system.zookeeper WHERE path = '/clickhouse' outputs data for all children on the /clickhouse node. To output data for all root nodes, write path = /. If the path specified in path doesnt exist, an exception will be thrown.

Columns:

  • 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.

Example:

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

Original article