This API operation is used to query the last cluster O&M task in an OceanBase cluster.
Call description
Limitations
The OBShell server verifies the security of requests to this API operation. For more information, see Hybrid encryption for API operations.
Request path
GET /api/v1/task/dag/maintain/ob
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | Boolean | Indicates whether the request is successful. |
| timestamp | time.Time | 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. |
| data | DagDetailDTO | The details of the directed acyclic graph (DAG) task. For more information, see the data structure of DagDetailDTO. |
| error | ApiError | The error caused by the request, which contains the following information:
|
The following table describes the data structure of DagDetailDTO.
| Parameter | Type | Description |
|---|---|---|
| id | String | The general ID of the DAG task. |
| dag_id | Integer | The ID of the DAG task, which is the primary key recorded in OceanBase Database. |
| name | String | The name of the DAG task. |
| stage | Integer | The current stage of the DAG task. |
| max_stage | Integer | The total number of stages of the DAG task during execution. |
| state | String | The execution status of the DAG task. |
| operator | String | The operation type of the DAG task. |
| start_time | time.Time | The time when the execution of the DAG task started. |
| end_time | time.Time | The time when the execution of the DAG task ended. |
| additional_data | map[string]any | Other data of the DAG task. |
| nodes | []NodeDetailDTO | The information about all OBServer nodes involved in the DAG task. For more information, see GetNodeDetails. |
Examples
Sample request
GET xxx.xxx.xxx.xxx:2886/api/v1/task/dag/maintain/ob
Sample response
The sample response displays the details of a DAG task named Cluster scale out. The operation type is RUN, and the execution result is SUCCEED.
{
"successful": true,
"timestamp": "2024-01-09T21:51:08.578629584+08:00",
"duration": 226,
"status": 200,
"traceId": "efbf77556046d332",
"data": {
"id": "11",
"dag_id": 1,
"name": "Cluster scale out",
"stage": 9,
"max_stage": 9,
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:01.706073+08:00",
"end_time": "2024-01-09T20:40:30.319822+08:00",
"additional_data": {},
"nodes": [
{
"id": "11",
"node_id": 1,
"name": "Integrate server config",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:01.718882+08:00",
"end_time": "2024-01-09T20:40:02.751743+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "11",
"task_id": 1,
"name": "Integrate server config",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:01.74723+08:00",
"end_time": "2024-01-09T20:40:01.76717+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": []
}
]
},
{
"id": "12",
"node_id": 2,
"name": "Create local scale out dag",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:03.77982+08:00",
"end_time": "2024-01-09T20:40:04.805204+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "12",
"task_id": 2,
"name": "Create local scale out dag",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:03.796683+08:00",
"end_time": "2024-01-09T20:40:03.836712+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": [
"create local scale out dag success, genericID:22130706433028869"
]
}
]
},
{
"id": "13",
"node_id": 3,
"name": "Wait scale out ready",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:05.828194+08:00",
"end_time": "2024-01-09T20:40:06.85324+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "13",
"task_id": 3,
"name": "Wait scale out ready",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:05.845011+08:00",
"end_time": "2024-01-09T20:40:05.861857+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": [
"local scale out dag task Be scaling agent is succeed"
]
}
]
},
{
"id": "14",
"node_id": 4,
"name": "Wait remote deploy finish",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:07.876596+08:00",
"end_time": "2024-01-09T20:40:13.968817+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "14",
"task_id": 4,
"name": "Wait remote deploy finish",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:07.894515+08:00",
"end_time": "2024-01-09T20:40:13.950807+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": [
"retry stage: 2 successfully",
"remote deploy task is succeed"
]
}
]
},
{
"id": "15",
"node_id": 5,
"name": "Wait remote start finish",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:14.996088+08:00",
"end_time": "2024-01-09T20:40:21.091862+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "15",
"task_id": 5,
"name": "Wait remote start finish",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:15.016+08:00",
"end_time": "2024-01-09T20:40:21.079217+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": [
"retry stage: 4 successfully",
"remote start observer task is succeed"
]
}
]
},
{
"id": "16",
"node_id": 6,
"name": "Prev check for scale_out",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:22.115167+08:00",
"end_time": "2024-01-09T20:40:23.142216+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "16",
"task_id": 6,
"name": "Prev check for scale_out",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:22.134063+08:00",
"end_time": "2024-01-09T20:40:22.148848+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": [
"PrevCheckTask execute"
]
}
]
},
{
"id": "17",
"node_id": 7,
"name": "Add server for scale_out",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:24.167045+08:00",
"end_time": "2024-01-09T20:40:25.194054+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "17",
"task_id": 7,
"name": "Add server for scale_out",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:24.186025+08:00",
"end_time": "2024-01-09T20:40:24.21232+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": [
"AddServerTask execute"
]
}
]
},
{
"id": "18",
"node_id": 8,
"name": "Add agent for scale_out",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:26.219246+08:00",
"end_time": "2024-01-09T20:40:27.247243+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "18",
"task_id": 8,
"name": "Add agent for scale_out",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:26.238089+08:00",
"end_time": "2024-01-09T20:40:26.252762+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": []
}
]
},
{
"id": "19",
"node_id": 9,
"name": "Check cluster scale_out whether finished",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:28.275457+08:00",
"end_time": "2024-01-09T20:40:30.315618+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "19",
"task_id": 9,
"name": "Check cluster scale_out whether finished",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:28.293296+08:00",
"end_time": "2024-01-09T20:40:30.308244+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": [
"FinishTask execute"
]
}
]
}
]
}
}