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

提交结果

  1. {
  2. status: "Success",
  3. msg: "migration task is successfully submitted."
  4. }

  1. {
  2. status: "Fail",
  3. msg: "Migration task submission failed"
  4. }

执行状态

  1. {
  2. status: "Success",
  3. msg: "migration task is running",
  4. dest_disk: "xxxxxx"
  5. }

  1. {
  2. status: "Success",
  3. msg: "migration task has finished successfully",
  4. dest_disk: "xxxxxx"
  5. }

  1. {
  2. status: "Success",
  3. msg: "migration task failed.",
  4. dest_disk: "xxxxxx"
  5. }

Examples

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