This API is used to query all unfinished tasks in a cluster.
Call description
Request path
/api/v1/task/dag/unfinish
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| show_detail | Boolean | No | true | Specifies whether to display the details of subtasks. Default value: true. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | Boolean | Indicates whether the request is 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. |
| data | Object | The data returned, which is of the DagDetailDTO type. For more information about the data structure of DagDetaiDTO, see GetDagDetails. |
| error | Object | The information about the error that occurred. |
Examples
Sample request
GET xxx.xxx.x.x:2886/api/v1/task/dag/unfinish?show_details=true
Sample response
{
"successful": true,
"timestamp": "2024-01-10T11:34:32.520371417+08:00",
"duration": 43,
"status": 200,
"traceId": "925c315c8fcf142d",
"data": {
"contents": [
{
"id": "11",
"dag_id": 1,
"name": "Cluster scale out",
"stage": 4,
"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.x.x",
"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.x.x",
"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-10T11:34:26.66493+08:00",
"end_time": "2024-01-10T11:34:27.687962+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-10T11:34:26.680745+08:00",
"end_time": "2024-01-10T11:34:26.695433+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.x.x",
"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": "RUNNING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:28.708662+08:00",
"end_time": "2024-01-10T11:34:28.708662+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "14",
"task_id": 4,
"name": "Wait remote deploy finish",
"state": "RUNNING",
"operator": "RUN",
"start_time": "2024-01-10T11:34:28.725462+08:00",
"end_time": "2024-01-10T11:34:22.514056+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.x.x",
"port": 2886
},
"task_logs": [
"retry stage: 2 successfully"
]
}
]
},
{
"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.x.x",
"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.x.x",
"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.x.x",
"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.x.x",
"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.x.x",
"port": 2886
},
"task_logs": null
}
]
}
]
}
]
}
}
The sample response displays the details of a cluster that is being scaled out. Only one unfinished scale-out task exists in the cluster. No node in the cluster involves any unfinished local task.