Help Center> Distributed Cache Service> API Reference> API V2> Data Migration> Querying the Progress of an Online Migration Task
Updated on 2022-09-19 GMT+08:00

Querying the Progress of an Online Migration Task

Function

This API is used to query progress details about an online migration task.

URI

GET /v2/{project_id}/migration-task/{task_id}/stats

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

task_id

Yes

String

Task ID.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

full_migration_progress

String

Percentage of the full migration progress.

offset

String

Incremental migration offset.

source_dbsize

String

Number of keys in the source Redis.

target_dbsize

String

Number of keys in the target Redis.

target_input_kbps

String

Key write traffic of the target Redis, in KB/s.

target_ops

String

Number of concurrent operations per second on the target Redis.

is_migrating

Boolean

Whether the migration task is in progress.

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Status code: 401

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Status code: 403

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Status code: 404

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Example Requests

https://dcs.cn-north-7.myhuaweicloud.com/v2/666486c2d9b948c1bbea57e714d744fa/migration-task/31c6fd2b-2893-430b-90ff-d1adb8060585/stats

Example Responses

Status code: 200

Progress of the online migration task queried successfully.

{
  "full_migration_progress" : 100,
  "offset" : 100,
  "source_dbsize" : 531221,
  "target_dbsize" : 531211,
  "target_input_kbps" : 50,
  "target_ops" : 5300,
  "is_migrating" : true
}

Status code: 400

Invalid request.

{
  "error_code" : "DCS.4133",
  "error_msg" : "Instance job is not found."
}

Status Codes

Status Code

Description

200

Progress of the online migration task queried successfully.

400

Invalid request.

401

Invalid authentication information.

403

The request is rejected.

404

The requested resource is not found.

500

Internal service error.

Error Codes

See Error Codes.