Перейти к содержимому
Последнее обновление

Миграция tablet

Запрос​

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

Описание​

Перенос tablet на указанный диск.

Параметры запроса​

  • goal

    • run:отправить задачу миграции
    • status:показать состояние задачи миграции
  • tablet_id Идентификатор tablet

  • schema_hash Хеш схемы

  • disk Указанный диск.

Тело запроса​

Отсутствует

Ответ​

Отправка задачи​

    {
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"
}

Примеры​

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

```