ADMIN SHOW REPLICA STATUS

description

  1. 该语句用于展示一个表或分区的副本状态信息
  2. 语法:
  3. ADMIN SHOW REPLICA STATUS FROM [db_name.]tbl_name [PARTITION (p1, ...)]
  4. [where_clause];
  5. where_clause:
  6. WHERE STATUS [!]= "replica_status"
  7. replica_status:
  8. OK: replica 处于健康状态
  9. DEAD: replica 所在 Backend 不可用
  10. VERSION_ERROR: replica 数据版本有缺失
  11. SCHEMA_ERROR: replica schema hash 不正确
  12. MISSING: replica 不存在

example

  1. 1. 查看表全部的副本状态
  2. ADMIN SHOW REPLICA STATUS FROM db1.tbl1;
  3. 2. 查看表某个分区状态为 VERSION_ERROR 的副本
  4. ADMIN SHOW REPLICA STATUS FROM tbl1 PARTITION (p1, p2)
  5. WHERE STATUS = "VERSION_ERROR";
  6. 3. 查看表所有状态不健康的副本
  7. ADMIN SHOW REPLICA STATUS FROM tbl1
  8. WHERE STATUS != "OK";

keyword

  1. ADMIN,SHOW,REPLICA,STATUS