在 ClickHouse Cloud 中查询此系统表中的数据分别保存在 ClickHouse Cloud 各节点的本地。因此,如需查看所有数据的完整情况,需要使用
clusterAllReplicas 函数。更多详情请参见此处。描述
此表会输出有关 ZooKeeper 的汇总内部信息,节点取自配置文件。 可用性system.zookeeper_info 仅在配置了 ClickHouse Keeper 或 ZooKeeper 时才存在。在两者均未配置的服务器上,该表不存在,针对它的查询会以 UNKNOWN_TABLE 错误失败。
列
zookeeper_cluster_name(String) — ZooKeeper 集群名称。host(String) — ClickHouse 所连接的 ZooKeeper 节点的主机名/IP。port(UInt16) — ClickHouse 所连接的 ZooKeeper 节点的端口。index(Nullable(UInt8)) — ClickHouse 所连接的 ZooKeeper 节点的索引。该索引取自 ZooKeeper 配置。如果未连接,则此列为 NULL。is_connected(UInt8) — ZooKeeper 是否已连接。is_readonly(Nullable(UInt8)) — 是否为只读。version(Nullable(String)) — ZooKeeper 版本。avg_latency(Nullable(UInt64)) — 平均延迟。max_latency(Nullable(UInt64)) — 最大延迟。min_latency(Nullable(UInt64)) — 最小延迟。packets_received(Nullable(UInt64)) — 接收到的数据包数量。packets_sent(Nullable(UInt64)) — 已发送的数据包数量。outstanding_requests(Nullable(UInt64)) — 未完成请求的数量。server_state(Nullable(String)) — 服务器状态。is_leader(Nullable(UInt8)) — 该 ZooKeeper 是否为 leader。znode_count(Nullable(UInt64)) — znode 数量。watch_count(Nullable(UInt64)) — watch 数量。ephemerals_count(Nullable(UInt64)) — 临时 (ephemeral) 节点数量。approximate_data_size(Nullable(UInt64)) — 数据大小的近似值。followers(Nullable(UInt64)) — leader 的跟随者数量。此字段仅由 leader 暴露。synced_followers(Nullable(UInt64)) — leader 的已同步跟随者数量。此字段仅由 leader 暴露。pending_syncs(Nullable(UInt64)) — leader 的待处理同步数量。此字段仅由 leader 暴露。open_file_descriptor_count(Nullable(UInt64)) — 已打开的文件描述符数量。仅在 Unix 平台上可用。max_file_descriptor_count(Nullable(UInt64)) — 文件描述符数量上限。仅在 Unix 平台上可用。connections(Nullable(UInt64)) — ZooKeeper 连接数。outstanding(Nullable(UInt64)) — ZooKeeper 未完成请求数。zxid(Nullable(Int64)) — ZooKeeper zxid。node_count(Nullable(UInt64)) — ZooKeeper 节点数量。snapshot_dir_size(Nullable(UInt64)) — ZooKeeper 快照目录大小。log_dir_size(Nullable(UInt64)) — ZooKeeper 日志目录大小。first_log_idx(Nullable(UInt64)) — ZooKeeper 首条日志的索引。first_log_term(Nullable(UInt64)) — ZooKeeper 首条日志的任期。last_log_idx(Nullable(UInt64)) — ZooKeeper 最后一条日志的索引。last_log_term(Nullable(UInt64)) — ZooKeeper 最后一条日志的任期。last_committed_idx(Nullable(UInt64)) — ZooKeeper 最后一个已提交的索引。leader_committed_log_idx(Nullable(UInt64)) — ZooKeeper leader 已提交的日志索引。target_committed_log_idx(Nullable(UInt64)) — ZooKeeper 目标已提交的日志索引。last_snapshot_idx(Nullable(UInt64)) — ZooKeeper 最后一个快照的索引。