Region Migration
Region 迁移允许用户在 Datanode 间移动 Region 数据。
注意
该功能仅在 GreptimeDB 集群模式下可用,并且需要满足以下条件
- 使用 Kafka WAL
- 使用共享存储 (例如:AWS S3)
无法在任何上述以外的情况下使用 Region 迁移。
查询 Region 分布
首先需要查询该数据表分区(Region)分布情况,即查询数据表中的 Region 分别在哪一些 Datanode 节点上。
select b.peer_id as datanode_id,
a.greptime_partition_id as region_id
from information_schema.partitions a left join information_schema.region_peers b
on a.greptime_partition_id = b.region_id where a.table_name='migration_target' order by datanode_id asc;