clusters 시스템 테이블
clusters 시스템 테이블
clusters 시스템 테이블은 구성 파일에서 사용 가능한 클러스터와 그 안의 서버에 대한 정보를 담고 있어요.
출처: 문서
본문
Description (설명)
구성 파일에서 사용 가능한 클러스터와 그 안의 서버에 대한 정보를 담고 있어요.
Columns (열)
cluster(String) — 클러스터 이름.shard_num(UInt32) — 클러스터의 샤드 번호(1부터 시작).shard_name(String) — 클러스터의 샤드 이름.shard_weight(UInt32) — 데이터를 쓸 때 샤드의 상대 가중치.internal_replication(UInt8) — 이 호스트가 자체적으로 데이터를 복제할 수 있는 앙상블의 일부인지 여부를 나타내는 플래그.replica_num(UInt32) — 샤드의 복제본 번호(1부터 시작).host_name(String) — 구성에 지정된 대로의 호스트 이름.host_address(String) — DNS에서 얻은 호스트 IP 주소.port(UInt16) — 서버에 연결하는 데 사용할 포트.is_local(UInt8) — 호스트가 로컬인지 여부를 나타내는 플래그.user(String) — 서버에 연결하기 위한 사용자 이름.default_database(String) — 기본 데이터베이스 이름.errors_count(UInt32) — 이 호스트가 복제본에 도달하지 못한 횟수.slowdowns_count(UInt32) — 헤지(hedged) 요청으로 연결을 설정할 때 복제본을 변경하게 만든 slowdown 수.estimated_recovery_time(UInt32) — 복제본 오류 횟수가 0이 되고 정상으로 간주될 때까지 남은 초.database_shard_name(String) —Replicated데이터베이스 샤드의 이름(Replicated데이터베이스에 속한 클러스터용).database_replica_name(String) —Replicated데이터베이스 복제본의 이름(Replicated데이터베이스에 속한 클러스터용).is_shared_catalog_cluster(UInt8) — 클러스터가 공유 카탈로그에 속하는지 여부를 나타내는 Bool.is_active(Nullable(UInt8)) — Replicated 데이터베이스 복제본의 상태(Replicated 데이터베이스에 속한 클러스터용): 1은 ‘복제본 온라인’, 0은 ‘복제본 오프라인’, NULL은 ‘알 수 없음’.unsynced_after_recovery(Nullable(UInt8)) — 복제본을 생성하거나 복구한 후 Replicated 데이터베이스 복제본에 max_replication_lag_to_enqueue보다 큰 복제 지연이 있는지 여부를 나타냄.replication_lag(Nullable(UInt32)) —Replicated데이터베이스 복제본의 복제 지연(Replicated 데이터베이스에 속한 클러스터용).recovery_time(Nullable(UInt64)) —Replicated데이터베이스 복제본의 복구 시간(Replicated 데이터베이스에 속한 클러스터용), 밀리초 단위.
Aliases (별칭):
name—cluster의 별칭.
Example (예제)
Query (쿼리)
SELECT * FROM system.clusters LIMIT 2 FORMAT Vertical;
Response (응답)
Row 1:
──────
cluster: test_cluster_two_shards
shard_num: 1
shard_name: shard_01
shard_weight: 1
replica_num: 1
host_name: 127.0.0.1
host_address: 127.0.0.1
port: 9000
is_local: 1
user: default
default_database:
errors_count: 0
slowdowns_count: 0
estimated_recovery_time: 0
database_shard_name:
database_replica_name:
is_active: NULL
Row 2:
──────
cluster: test_cluster_two_shards
shard_num: 2
shard_name: shard_02
shard_weight: 1
replica_num: 1
host_name: 127.0.0.2
host_address: 127.0.0.2
port: 9000
is_local: 0
user: default
default_database:
errors_count: 0
slowdowns_count: 0
estimated_recovery_time: 0
database_shard_name:
database_replica_name:
is_active: NULL