mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 18:02:24 +00:00
57d60dc4f2
* Refactor the code * Add a new column xid for zookeeper_connection * Support hostnames in the configuration * Fix a typo * Fix a typo * Fix a typo * Fix a bug about connect_time * Update test case * Update test case * Fix a special build check error * Resolve conflicts caused by rebase. * Update failed test case * Refactor the code according to comment * Fix two compilation errors
2.3 KiB
2.3 KiB
slug |
---|
/en/operations/system-tables/zookeeper_connection |
#zookeeper_connection
This table does not exist if ZooKeeper is not configured. The 'system.zookeeper_connection' table shows current connections to ZooKeeper (including auxiliary ZooKeepers). Each row shows information about one connection.
Columns:
name
(String) — ZooKeeper cluster's name.host
(String) — The hostname/IP of the ZooKeeper node that ClickHouse connected to.port
(String) — The port of the ZooKeeper node that ClickHouse connected to.index
(UInt8) — The index of the ZooKeeper node that ClickHouse connected to. The index is from ZooKeeper config.connected_time
(DateTime) — When the connection was establishedsession_uptime_elapsed_seconds
(UInt64) — Seconds elapsed since the connection was establishedis_expired
(UInt8) — Is the current connection expired.keeper_api_version
(String) — Keeper API version.client_id
(UInt64) — Session id of the connection.xid
(Int32) — Xid of the current session.
Example:
SELECT * FROM system.zookeeper_connection;
┌─name────┬─host──────┬─port─┬─index─┬──────connected_time─┬─session_uptime_elapsed_seconds─┬─is_expired─┬─keeper_api_version─┬─client_id─┐
│ default │ 127.0.0.1 │ 9181 │ 0 │ 2023-06-15 14:36:01 │ 3058 │ 0 │ 3 │ 5 │
└─────────┴───────────┴──────┴───────┴─────────────────────┴────────────────────────────────┴────────────┴────────────────────┴───────────┘