跳到主要内容
跳到主要内容

迁移 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 的 id

  • schema_hash schema hash

  • disk 目标磁盘。

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

```bash
curl "http://127.0.0.1:8040/api/tablet_migration?goal=run&tablet_id=123&schema_hash=333&disk=/disk1"

```