Description
You can call this operation to replace the arbitration service for multiple OceanBase clusters.
Call description
Prerequisites
- You have the ARBITRATION:UPDATE permission on the target arbitration service.
- You have the CLUSTER:UPDATE permission on all clusters specified in the
clusterIdListparameter.
Request path
POST /api/v2/ob/clusters/batchReplaceArbitration
Request parameters
body:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| arbitrationServiceId | Long | Yes | 1 | The ID of the target arbitration service. |
| clusterIdList | List<Long> | Yes | 83,84 | The list of IDs of the OceanBase clusters whose arbitration service will be replaced. Separate the cluster IDs with commas (,). |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The information about the asynchronous task. For more information, see Task return structure. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Examples
Sample request
POST /api/v2/ob/clusters/batchReplaceArbitration
{
"clusterIdList":[83,84],
"arbitrationServiceId":21
}
Sample response
{
"data": {
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"id": 29769,
"name": "Batch replace arbitration service",
"operation": "EXECUTE",
"prohibitRollback": false,
"startTime": "2025-01-22T18:11:12.864+08:00",
"status": "RUNNING",
"subtasks": [
{
"description": "Wait node",
"downstreams": [
40583,
40589
],
"id": 40581,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 10,
"status": "PENDING",
"taskId": 29769,
"timeout": 30,
"upstreams": [
40579,
40584
]
},
{
"description": "Wait node",
"downstreams": [
40580,
40585
],
"id": 40586,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 4,
"status": "PENDING",
"taskId": 29769,
"timeout": 30,
"upstreams": [
40582,
40587
]
},
{
"description": "Replace arbitration service",
"downstreams": [
40588
],
"id": 40580,
"name": "Replace arbitration service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 9,
"status": "PENDING",
"taskId": 29769,
"timeout": 3600,
"upstreams": [
40586
]
},
{
"description": "Update OB cluster status",
"downstreams": [],
"id": 40589,
"name": "Update OB cluster status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 7,
"status": "PENDING",
"taskId": 29769,
"timeout": 30,
"upstreams": [
40581
]
},
{
"description": "Replace arbitration service",
"downstreams": [
40588
],
"id": 40585,
"name": "Replace arbitration service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 8,
"status": "PENDING",
"taskId": 29769,
"timeout": 3600,
"upstreams": [
40586
]
},
{
"description": "Update ob cluster arbitration",
"downstreams": [
40581
],
"id": 40584,
"name": "Update ob cluster arbitration",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 1,
"prohibitRollback": true,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 1,
"status": "PENDING",
"taskId": 29769,
"timeout": 300,
"upstreams": [
40588
]
},
{
"description": "Prepare to operate arbitration services",
"downstreams": [
40586
],
"id": 40582,
"name": "Prepare to operate arbitration services",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 3,
"status": "READY",
"taskId": 29769,
"timeout": 60,
"upstreams": []
},
{
"description": "Wait node",
"downstreams": [
40579,
40584
],
"id": 40588,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"taskId": 29769,
"timeout": 30,
"upstreams": [
40580,
40585
]
},
{
"description": "Update ob cluster arbitration",
"downstreams": [
40581
],
"id": 40579,
"name": "Update ob cluster arbitration",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": true,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 0,
"status": "PENDING",
"taskId": 29769,
"timeout": 300,
"upstreams": [
40588
]
},
{
"description": "Prepare to operate arbitration services",
"downstreams": [
40586
],
"id": 40587,
"name": "Prepare to operate arbitration services",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 2,
"status": "READY",
"taskId": 29769,
"timeout": 60,
"upstreams": []
},
{
"description": "Update OB cluster status",
"downstreams": [],
"id": 40583,
"name": "Update OB cluster status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 6,
"status": "PENDING",
"taskId": 29769,
"timeout": 30,
"upstreams": [
40581
]
}
],
"taskDefinitionId": -1,
"type": "MANUAL"
},
"duration": 45,
"server": "5e11a5f435",
"status": 200,
"successful": true,
"timestamp": "2025-01-22T18:11:12.885+08:00",
"traceId": "68e26ca8a295625f"
}