Migration Tablet

Request

GET /api/tablet_migration?goal={enum}&tablet_id={int}&schema_hash={int}&disk={string}

Description

Migrate a tablet to the specified disk.

Query parameters

  • goal

  • run:submit the migration task

  • status:show the status of migration task
  • tablet_id ID of the tablet
  • schema_hash Schema hash
  • disk The specified disk.

Request body

None

Response

Submit Task

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

Or

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

Show Status

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

Or

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

Or

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"

4. ```