This API operation is used to query the unfinished cluster tasks on a node whose identity is CLUSTER AGENT.
Call description
Limitations
The OBShell server verifies the security of requests to this API operation. For more information, see Hybrid encryption for API operations.
The identity of the request object must be
CLUSTER AGENT.
Request path
GET /api/v1/task/dag/ob/unfinish
Request parameters
| Parameter | Type | Required? | Example value | Description |
|---|---|---|---|---|
| show_detail | Boolean | No | true | Specifies whether to display the details of subtasks. The default value is true. |
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.xx.xx:2886/api/v1/task/dag/ob/unfinish
Sample response
The sample response displays the details of a cluster that is being scaled out. Only one unfinished cluster scale-out task exists in the cluster.
{
"successful": true,
"timestamp": "2024-01-10T11:34:26.004688655+08:00",
"duration": 46,
"status": 200,
"traceId": "4da76cbedcd36098",
"data": {
"contents": [
{
"id": "11",
"dag_id": 1,
"name": "Cluster scale out",
"stage": 3,
"max_stage": 9,
"state": "RUNNING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.556477+08:00",
"end_time": "2024-01-10T11:34:22.47652+08:00",
"additional_data": {},
"nodes": [
{
"id": "11",
"node_id": 1,
"name": "Integrate server config",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.567766+08:00",
"end_time": "2024-01-10T11:34:23.595834+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "11",
"task_id": 1,
"name": "Integrate server config",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.59098+08:00",
"end_time": "2024-01-10T11:34:22.611066+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-10T11:34:24.621206+08:00",
"end_time": "2024-01-10T11:34:25.644996+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-10T11:34:24.635881+08:00",
"end_time": "2024-01-10T11:34:24.670586+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": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.513+08:00",
"end_time": "2024-01-10T11:34:22.513+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "13",
"task_id": 3,
"name": "Wait scale out ready",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.513+08:00",
"end_time": "2024-01-10T11:34:22.513+08:00",
"additional_data": null,
"execute_times": 0,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": null
}
]
},
{
"id": "14",
"node_id": 4,
"name": "Wait remote deploy finish",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.514056+08:00",
"end_time": "2024-01-10T11:34:22.514056+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "14",
"task_id": 4,
"name": "Wait remote deploy finish",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.514056+08:00",
"end_time": "2024-01-10T11:34:22.514056+08:00",
"additional_data": null,
"execute_times": 0,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": null
}
]
},
{
"id": "15",
"node_id": 5,
"name": "Wait remote start finish",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.514056+08:00",
"end_time": "2024-01-10T11:34:22.514056+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "15",
"task_id": 5,
"name": "Wait remote start finish",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.515112+08:00",
"end_time": "2024-01-10T11:34:22.515112+08:00",
"additional_data": null,
"execute_times": 0,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": null
}
]
},
{
"id": "16",
"node_id": 6,
"name": "Prev check for scale_out",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.515112+08:00",
"end_time": "2024-01-10T11:34:22.515112+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "16",
"task_id": 6,
"name": "Prev check for scale_out",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.51617+08:00",
"end_time": "2024-01-10T11:34:22.51617+08:00",
"additional_data": null,
"execute_times": 0,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": null
}
]
},
{
"id": "17",
"node_id": 7,
"name": "Add server for scale_out",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.51617+08:00",
"end_time": "2024-01-10T11:34:22.51617+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "17",
"task_id": 7,
"name": "Add server for scale_out",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.51617+08:00",
"end_time": "2024-01-10T11:34:22.51617+08:00",
"additional_data": null,
"execute_times": 0,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": null
}
]
},
{
"id": "18",
"node_id": 8,
"name": "Add agent for scale_out",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.517232+08:00",
"end_time": "2024-01-10T11:34:22.517232+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "18",
"task_id": 8,
"name": "Add agent for scale_out",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.517232+08:00",
"end_time": "2024-01-10T11:34:22.517232+08:00",
"additional_data": null,
"execute_times": 0,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": null
}
]
},
{
"id": "19",
"node_id": 9,
"name": "Check cluster scale_out whether finished",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.517232+08:00",
"end_time": "2024-01-10T11:34:22.517232+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "19",
"task_id": 9,
"name": "Check cluster scale_out whether finished",
"state": "PENDING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:22.518288+08:00",
"end_time": "2024-01-10T11:34:22.518288+08:00",
"additional_data": null,
"execute_times": 0,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": null
}
]
}
]
}
]
}
}