Performing a Redistribution Task
Function
This API is used to evenly distribute data from old nodes to new nodes after cluster scale-out. After data redistribution, the service response speed is greatly improved.
The redistribution function is supported by DWS clusters of version 2.0 8.1.1.200 or later.
Offline scheduling is not supported in 8.2.0 or later.
This function can be manually enabled only when the cluster task information displays To be redistributed after scale-out.
You can also select the redistribution mode when you configure cluster scale-out (see Configure advanced parameters).
Redistribution queues are sorted based on the relpage size of tables. To ensure that the relpage size is correct, you are advised to perform the ANALYZE operation on the tables to be redistributed.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/clusters/{cluster_id}/redistribution
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
cluster_id |
Yes |
String |
Definition Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID. Constraints N/A Range N/A Default Value N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
redis_mode |
Yes |
String |
Definition Redistribution mode. Constraints N/A Range online offline Default Value offline |
parallel_jobs |
Yes |
Integer |
Definition Redistribution concurrency. Constraints N/A Range 4 to 200 Default Value 4 |
Response Parameters
Status code: 200
Redistribution task submitted.
None
Example Requests
Perform offline cluster redistribution task and set the number of concurrent tasks to 100.
POST https://{Endpoint}/v2/89cd04f168b84af6be287f71730fdb4b/clusters/e59d6b86-9072-46eb-a996-13f8b44994c1/redistribution { "redis_mode" : "offline", "parallel_jobs" : 100 }
Example Responses
Status code: 200
Redistribution task submitted.
{ }
Status Codes
Status Code |
Description |
---|---|
200 |
Redistribution task submitted. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
You do not have required permissions. |
404 |
No resources found. |
500 |
Internal server error. |
503 |
Service unavailable. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot