迁移 tablet
Request
GET /api/tablet_migration?goal={enum}&tablet_id={int}&schema_hash={int}&disk={string}
Description
在 BE 节点上迁移单个 tablet 到指定磁盘
Query parameters
goal
run
:提交迁移任务status
:查询任务的执行状态
tablet_id
需要迁移的 tablet 的 idschema_hash
schema hashdisk
目标磁盘。
Request body
无
Response
提交结果
{
status: "Success",
msg: "migration task is successfully submitted."
}
或
{
status: "Fail",
msg: "Migration task submission failed"
}
执行状态
{
status: "Success",
msg: "migration task is running",
dest_disk: "xxxxxx"
}
或
{
status: "Success",
msg: "migration task has finished successfully",
dest_disk: "xxxxxx"
}
或
{
status: "Success",
msg: "migration task failed.",
dest_disk: "xxxxxx"
}
Examples
```shell
curl "http://127.0.0.1:8040/api/tablet_migration?goal=run&tablet_id=123&schema_hash=333&disk=/disk1"
```