Description
You can call this operation to select multiple arbitration service endpoints and create an arbitration service group.
Call description
Prerequisites
You have the ARBITRATION:UPDATE permission on all arbitration services in the arbitration service list.
Request path
POST /api/v2/arbitration/services/groups
Request parameters
body:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| name | String | Yes | group_a | The name of the arbitration service group. |
| arbitrationServiceIdList | List<Long> | Yes | 21,22 | The list of IDs of the arbitration services in the group. Separate the IDs with commas (,). |
| autoReplace | Boolean | Yes | true | Specifies whether to enable automatic arbitration service switching. |
| autoReplaceStrategy | Object | Yes | - | For more information, see the Automatic switching strategy section in this topic. |
| description | String | No | arbitrationServiceGroup | The remarks. |
Automatic switching strategy
| Parameter | Type | Description |
|---|---|---|
| strategyType | String | The type of the automatic switching strategy. |
| threshold | Integer | The threshold for triggering the automatic switching strategy. The value depends on the setting of strategyType:UNIT_COUNT: the number of units in a cluster that cannot connect to the arbitration service.UNIT_PERCENTAGE: the percentage of units in a cluster that cannot connect to the arbitration service.DEFAULT: empty. |
| duration | Long | The duration, in seconds, after which the arbitration service is switched if the specified threshold is reached. The value 0 specifies to switch the arbitration service immediately when the specified threshold is reached. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | For more information, see the Arbitration service group information 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. |
Arbitration service group information
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the arbitration service group. |
| name | String | The name of the arbitration service group. |
| autoReplace | Boolean | Specifies whether to enable automatic arbitration service switching. |
| autoReplaceStrategy | Object | For more information, see the Automatic switching strategy section in this topic. |
| arbitrationServices | List<Object> | For more information, see the Arbitration services in the group section in this topic. |
| description | String | The remarks. |
| updateTime | OffsetDateTime | The time when the service group was last modified. |
Automatic switching strategy
| Parameter | Type | Description |
|---|---|---|
| strategyType | String | The type of the automatic switching strategy. |
| threshold | Integer | The threshold for triggering the automatic switching strategy. The value depends on the setting of strategyType: UNIT_COUNT: the number of units in a cluster that cannot connect to the arbitration service.UNIT_PERCENTAGE: the percentage of units in a cluster that cannot connect to the arbitration service.DEFAULT: empty. |
| duration | Long | The duration, in seconds, after which the arbitration service is switched if the specified threshold is reached. The value 0 specifies to switch the arbitration service immediately when the specified threshold is reached. |
Arbitration services in the group
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the arbitration service. |
| hostId | Long | The ID of the host where the arbitration service resides. |
| svrIp | String | The IP address of the host where the arbitration service resides. |
| svrPort | Integer | The port of the arbitration service. |
| status | String | The status of the arbitration service. |
| groupId | Long | The ID of the service group to which the arbitration service belongs. |
| groupName | String | The name of the service group. |
| priority | Integer | The priority of the arbitration service in the service group. |
| operatingTaskInstanceId | Long | The ID of the running task. |
| statusAnalysis | Object | For more information, see the Exception analysis section in this topic. |
| version | String | The version of the arbitration service. |
| installPath | String | The installation directory of the arbitration service. |
| runPath | String | The operation directory of the arbitration service. |
| runUser | String | The user who runs the arbitration service. |
| architecture | String | The architecture of the host where the arbitration service resides. |
| description | String | The description of the arbitration service. |
| clusters | List<Object> | For more information, see the Information of associated clusters section in this topic. |
| createTime | OffsetDateTime | The time when the arbitration service was created. |
| updateTime | OffsetDateTime | The time when the arbitration service was last modified. |
| startupParameters | Object | For more information, see the Startup parameters of an arbitration service section in this topic. |
| tags | List<Object> | The tags. |
Exception analysis
| Parameter | Type | Description |
|---|---|---|
| startTime | OffsetDateTime | The time when the exception started. |
| reason | String | The cause of the exception. |
| action | String | The suggested solution. |
| reasonType | String | The type of the exception cause. |
| diagnosisType | String | The diagnostic type. |
| diagnosisContent | Object | The content of the diagnosis. |
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. |
| tags | List<Object> | For more information, see the Tags section in this topic. |
| tenants | List<Object> | For more information, see the Information of tenants in the clusters 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. |
Startup parameters of an arbitration service
| Parameter | Type | Description |
|---|---|---|
| name | String | The name of the parameter. |
| value | String | The value of the parameter. |
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/groups
{
"name":"arb_group_a",
"arbitrationServiceIdList":[21,22],
"autoReplace":true,
"autoReplaceStrategy":{
"strategyType":"DEFAULT",
"duration":10
},
"description":"arbitrationServiceGroup"
}
Sample response
{
"data": {
"arbitrationServices": [
{
"architecture": "x86_64",
"clusters": [],
"createTime": "2025-01-21T10:41:59+08:00",
"description": "arbitration_service_1",
"groupId": 3,
"groupName": "arb_group_a",
"hostId": 11,
"id": 21,
"installPath": "/home/admin/oceanbase",
"priority": 1,
"runPath": "/home/admin/oceanbase",
"runUser": "admin",
"startupParameters": [],
"status": "RUNNING",
"svrIp": "xxx.xxx.xxx.xxx",
"svrPort": 2882,
"updateTime": "2025-01-21T10:57:27+08:00",
"version": "4.3.3.1-101000032024102022"
},
{
"architecture": "x86_64",
"clusters": [],
"createTime": "2025-01-21T10:42:19+08:00",
"description": "arbitration_service_2",
"groupId": 3,
"groupName": "arb_group_a",
"hostId": 11,
"id": 22,
"installPath": "/home/admin/hj/oceanbase",
"priority": 2,
"runPath": "/home/admin/hj/oceanbase",
"runUser": "admin",
"startupParameters": [],
"status": "RUNNING",
"svrIp": "xxx.xxx.xxx.xxx",
"svrPort": 2883,
"updateTime": "2025-01-21T10:44:51+08:00",
"version": "4.3.3.1-101000032024102022"
}
],
"autoReplace": true,
"autoReplaceStrategy": {
"duration": 10,
"strategyType": "DEFAULT"
},
"description": "arbitrationServiceGroup",
"id": 3,
"name": "arb_group_a"
},
"duration": 53,
"server": "6d952bd732",
"status": 200,
"successful": true,
"timestamp": "2025-01-21T11:03:47.436+08:00",
"traceId": "d91ce36addbf2963"
}