Description
You can call this operation to check whether the host to take over the arbitration service already exists and the observer process exists on the host, If yes, the host can take over the arbitration service.
Call description
Prerequisites
You have the ARBITRATION:CREATE permission.
Request path
POST /api/v2/arbitration/services/takeOverPreCheck
Request parameters
body:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| hostId | Long | Yes | 1 | The ID of the host to which the arbitration service will be taken over. |
| svrPort | Integer | Yes | 2883 | The port of the arbitration service. |
| description | String | No | takeoverPreCheck | The description. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | For more information, see the Result of arbitration service takeover precheck section in this topic. |
| 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. |
Result of arbitration service takeover precheck
| Parameter | Type | Description |
|---|---|---|
| checkSuccess | Boolean | Indicates whether the precheck is successful. |
| errorInfos | List<Object> | For more information, see the Errors/Warnings section in this topic. |
| warningInfos | List<Object> | For more information, see the Errors/Warnings section in this topic. |
| hostId | Long | The ID of the host. |
| ipAddress | String | The IP address of the host. |
| svrPort | Integer | The port of the arbitration service. |
| installPath | String | The installation directory of the arbitration service. |
| runPath | String | The operation directory of the arbitration service. |
| version | String | The version of the arbitration service. |
| runUser | String | The user who runs the arbitration service. |
| startupParameters | Object | For information, see the Startup parameters of an arbitration service section in this topic. |
| relatedClusters | List<Object> | For more information, see the Information of associated clusters section in this topic. |
Errors/Warnings
| Parameter | Type | Description |
|---|---|---|
| warning | Boolean | Indicates whether a warning message is returned. |
| errorCode | String | The error code. |
| args | Object[] | Other attributes. |
| errorMessage | String | The error message. |
Startup parameters of an arbitration service
| Parameter | Type | Description |
|---|---|---|
| name | String | The name of the parameter. |
| value | String | The value of the parameter. |
Information of associated clusters
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the cluster. |
| name | String | The name of the cluster. |
| obClusterId | Long | The cluster ID generated by the OceanBase Database system. |
| status | String | The status of the cluster. |
| tenants | List<Object> | For more information, see the Information of tenants in the clusters section in this topic. |
| tags | List<Object> | For more information, see the Tags section in this topic. |
Information of tenants in the clusters
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the tenant. |
| name | String | The name of the tenant. |
| obTenantId | Long | The tenant ID generated by the OceanBase Database system. |
| arbitrationStatus | String | The status of the arbitration service. |
| degradedLsIdList | List<Long> | The IDs of the downgraded log streams. |
Tags
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the tag. |
| key | String | The key of the tag. |
| value | String | The value of the tag. |
| refs | List<Object> | For more information, see the Objects bound to the tag section in this topic. |
Objects bound to the tag
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the tag. |
| name | String | The name of the tag. |
| resourceType | String | The type of the object. |
Examples
Sample request
POST /api/v2/arbitration/services/takeOverPreCheck
{
"hostId": 1,
"svrPort":2883,
"description":"takeoverPreCheck"
}
Sample response
{
"data": {
"checkSuccess": true,
"errorInfos": [],
"hostId": 4,
"installPath": "/home/admin/oceanbase",
"ipAddress": "xxx.xxx.xxx.xxx",
"relatedClusters": [],
"runPath": "/home/admin/oceanbase",
"runUser": "admin",
"startupParameters": [
{
"name": "max_syslog_file_count",
"value": "100"
},
{
"name": "enable_syslog_recycle",
"value": "True"
}
],
"svrPort": 2882,
"version": "4.3.4.0-200000022024070119",
"warningInfos": []
},
"duration": 186,
"server": "6d952bd732",
"status": 200,
"successful": true,
"timestamp": "2024-12-23T21:54:35.008+08:00",
"traceId": "930d126345139916"
}