首批通过分布式安全可靠测评,为关键业务系统打造
OceanBase 集群停止 Zone
更新时间:2026-04-14 11:55:54
功能说明
该接口用于停止指定 OceanBase 集群的 Zone。
调用说明
接口约束
请求路径
POST /api/v2/ob/clusters/{id}/zones/{zoneName}/stop
请求参数
path:
| 参数 | 类型 | 必选 | 示例值 | 描述 |
|---|---|---|---|---|
| id | Integer | 是 | 1 | 待停止 Zone 的 OceanBase 集群 ID。 |
| zoneName | String | 是 | 1 | 待停止的 Zone 名。 |
返回结果
基础数据结构
| 参数 | 类型 | 说明 |
|---|---|---|
| data | Object | 异步任务信息,详情参见 任务信息。 |
| successful | Boolean | 请求是否成功。 |
| timestamp | Datetime | 服务端完成请求的时间戳。 |
| duration | Integer | 服务端处理请求的时间(毫秒)。 |
| status | Integer | 符合 HTTP Status 规范的编码。 |
| traceId | String | 请求的 Trace ID,用于排查问题。 |
| server | String | 响应请求的应用服务的地址。 |
示例
请求示例
POST /api/v2/ob/clusters/1/zones/zone2/stop
返回示例
{
"data": {
"clusterId": 12000001,
"context": {
"listMap": {
"server_ids": [
"13000001"
]
},
"parallel": false,
"parallelIdx": -1,
"stringMap": {
"cluster_name": "protoss",
"cluster_id": "12000001",
"ocpagent_service_name": "agent",
"prohibit_rollback": "false",
"former_cluster_status": "RUNNING",
"zone_name": "zone2",
"target_cluster_status": "RUNNING"
}
},
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"id": 89026504,
"name": "Stop OB zone",
"operation": "EXECUTE",
"startTime": "2021-09-05T22:22:20.963+08:00",
"status": "RUNNING",
"subtasks": [
{
"className": "com.alipay.ocp.service.task.business.cluster.SyncClusterInfoTask",
"description": "Sync cluster info",
"downstreams": [
89029854
],
"id": 89029852,
"name": "Sync cluster info",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 2,
"status": "PENDING",
"timeout": 30,
"upstreams": [
89029851
]
},
{
"className": "com.alipay.ocp.service.task.business.zone.StopObZoneTask",
"description": "Stop zone",
"downstreams": [
89029860
],
"id": 89029856,
"name": "Stop zone",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 0,
"status": "PENDING",
"timeout": 1800,
"upstreams": [
89029855
]
},
{
"className": "com.alipay.ocp.service.task.business.server.PrepareStopObServerTask",
"description": "Prepare stop observer",
"downstreams": [
89029858
],
"id": 89029860,
"name": "Prepare stop observer",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 1,
"status": "PENDING",
"timeout": 300,
"upstreams": [
89029856
]
},
{
"className": "com.alipay.ocp.service.task.business.zone.PrepareStopObZoneTask",
"description": "Prepare stop OB zone",
"downstreams": [
89029856
],
"id": 89029855,
"name": "Prepare stop OB zone",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 9,
"status": "READY",
"timeout": 1800,
"upstreams": [
]
},
{
"className": "com.alipay.ocp.service.task.business.WaitNode",
"description": "Wait node",
"downstreams": [
89029853
],
"id": 89029859,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 7,
"status": "PENDING",
"timeout": 30,
"upstreams": [
89029857
]
},
{
"className": "com.alipay.ocp.service.task.business.server.UpdateObServerStatusTask",
"description": "Update observer status",
"downstreams": [
89029851
],
"id": 89029853,
"name": "Update observer status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"timeout": 300,
"upstreams": [
89029859
]
},
{
"className": "com.alipay.ocp.service.task.business.WaitNode",
"description": "Wait node",
"downstreams": [
89029857
],
"id": 89029858,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 8,
"status": "PENDING",
"timeout": 30,
"upstreams": [
89029860
]
},
{
"className": "com.alipay.ocp.service.task.business.server.StopObServerProcessTask",
"description": "Stop observer process",
"downstreams": [
89029859
],
"id": 89029857,
"name": "Stop observer process",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 3,
"status": "PENDING",
"timeout": 1200,
"upstreams": [
89029858
]
},
{
"className": "com.alipay.ocp.service.task.business.cluster.UpdateObClusterStatusTask",
"description": "Update OB cluster status",
"downstreams": [
],
"id": 89029854,
"name": "Update OB cluster status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 6,
"status": "PENDING",
"timeout": 30,
"upstreams": [
89029852
]
},
{
"className": "com.alipay.ocp.service.task.business.zone.UpdateObZoneStatusTask",
"description": "Update zone status",
"downstreams": [
89029852
],
"id": 89029851,
"name": "Update zone status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 4,
"status": "PENDING",
"timeout": 1800,
"upstreams": [
89029853
]
}
],
"taskDefinitionId": -1,
"type": "MANUAL"
},
"duration": 141,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-09-05T22:22:21.009+08:00",
"traceId": "71e073145dba4fc8"
}