欢迎访问 OceanBase 官网获取更多信息:https://www.oceanbase.com/
功能说明
该接口用于停止 OceanBase 集群。
调用说明
接口约束
- 调用者需具备停止 OceanBase 集群的权限。
关于调用者的权限,详情可参见 安全概述。
- 调用者需要通过 OCP 应用服务鉴权。
请求路径
POST /api/v2/ob/clusters/{id}/stop
path:
参数 | 类型 | 必选 | 示例值 | 描述 |
|---|---|---|---|---|
id | Long | 是 | 1 | 需停止的 OceanBase 集群 的 ID。 |
返回结果
基础数据结构
参数 | 类型 | 说明 |
|---|---|---|
data | Object | 异步任务信息,详情参见 任务信息。 |
successful | Boolean | 请求是否成功。 |
timestamp | Datetime | 服务端完成请求的时间戳。 |
duration | Integer | 服务端处理请求的时间(毫秒)。 |
status | Integer | 符合 HTTP Status 规范的编码。 |
traceId | String | 请求的 Trace ID,用于排查问题。 |
server | String | 响应请求的应用服务的地址。 |
示例
请求示例
POST /api/v2/ob/clusters/1/stop
返回示例
{
"data": {
"cluster": {
"id": 21,
"name": "ob_upgrade",
"obClusterId": 22
},
"context": "Context(parallelIdx=-1, stringMap={cluster_name=ob_upgrade, cluster_id=21, former_cluster_status=RUNNING}, listMap={server_ids=[5], zone_names=[zone1]})",
"creator": {
"id": 100,
"name": "admin"
},
"id": 107302,
"name": "Stop OB cluster",
"startTime": "2021-03-02T10:29:04.849+08:00",
"status": "RUNNING",
"tasks": [
{
"description": "Wait node",
"downstreams": [
128802
],
"id": 128795,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128796
]
},
{
"description": "Prepare stop observer",
"downstreams": [
128795
],
"id": 128796,
"name": "Prepare stop observer",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128803
]
},
{
"description": "Update OB cluster status",
"downstreams": [
],
"id": 128797,
"name": "Update OB cluster status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128805
]
},
{
"description": "Prepare stop OB zone",
"downstreams": [
128803
],
"id": 128798,
"name": "Prepare stop OB zone",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128801
]
},
{
"description": "Wait node",
"downstreams": [
128805
],
"id": 128799,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128804
]
},
{
"description": "Wait node",
"downstreams": [
128804
],
"id": 128800,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128802
]
},
{
"description": "Prepare stop cluster",
"downstreams": [
128798
],
"id": 128801,
"name": "Prepare stop cluster",
"operation": "EXECUTE",
"status": "RUNNING",
"upstreams": [
]
},
{
"description": "Stop observer process",
"downstreams": [
128800
],
"id": 128802,
"name": "Stop observer process",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128795
]
},
{
"description": "Wait node",
"downstreams": [
128796
],
"id": 128803,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128798
]
},
{
"description": "Update observer status",
"downstreams": [
128799
],
"id": 128804,
"name": "Update observer status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128800
]
},
{
"description": "Update zone status",
"downstreams": [
128797
],
"id": 128805,
"name": "Update zone status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128799
]
}
]
},
"duration": 107,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-03-02T10:29:04.907+08:00",
"traceId": "1551f7149ed5483b"
}
欢迎访问 OceanBase 官网获取更多信息:https://www.oceanbase.com/




