功能
INFORMATION_SCHEMA.META_CLUSTER_NODES用于展示实例内节点的元信息。字段说明
字段名 | 类型 | 描述 |
node_id | bigint unsigned | 节点 ID。 |
node_name | varchar(64) | 节点 Name。 |
conn_id | int unsigned | 节点连接 ID。 |
rpc_addr | varchar(64) | RPC 地址。 |
sql_addr | varchar(64) | SQL 地址。 |
node_term | bigint unsigned | 节点任期。 |
node_version | varchar(64) | 节点版本号。 |
node_state | varchar(64) | 节点状态。 |
capacity | bigint unsigned | 节点容量。 |
available | bigint unsigned | 节点可用量。 |
leader_count | int | 节点 Leader 数量。 |
learner_count | int | 节点 Learner 数量。 |
rep_group_count | int | 节点 RG 数量。 |
leader_size | bigint | 节点 Leader 类型副本占用的空间。 |
learner_size | bigint | 节点 Learner 类型副本占用的空间。 |
rep_group_size | bigint | 节点所有类型副本占用的空间。 |
last_report_time | varchar(64) | 节点 TDStore 心跳最后上报时间。 |
global_earliest_snapshot | bigint unsigned | 全局最早 snapshot 时间。 |
local_earliest_snapshot | bigint unsigned | 该节点 TDStore 最早 snapshot 时间。 |
engine_local_earliest_snapshot | bigint unsigned | 该节点 SQLEngine 最早 snapshot 时间。 |
engine_last_report_time | varchar(64) | 节点 SQLEngine 心跳最后上报时间。 |
leader_weight | double | Leader 权重。 |
replica_weight | double | 副本权重。 |
node_labels | longblob | 节点标签。 |
示例
tdsql>select * from information_schema.meta_cluster_nodes limit 1\\G*************************** 1. row ***************************node_id: 1node_name: node-tdsql3-86ea1ffe-001conn_id: 1rpc_addr: 10.0.36.9:6005sql_addr: 10.0.36.9:6008node_term: 28924771945152603node_version: sqlengine-18.1.0node_state: NODE_STATE_UPcapacity: 21474836480available: 8415584256leader_count: 0learner_count: 0rep_group_count: 2leader_size: 0learner_size: 0rep_group_size: 9730233last_report_time: 2024-08-19 17:10:46.312314global_earliest_snapshot: 28924903780515894local_earliest_snapshot: 28924904048951464engine_local_earliest_snapshot: 28924904048951460engine_last_report_time: 2024-08-19 17:10:45.042880leader_weight: 1replica_weight: 1node_labels: key: "tdsql-migrate-node-task-dst-node"1 row in set (0.01 sec)