查询execution
get_execution(execution_id)
功能描述
查询特定execution执行结果。
输入参数
| 参数 | 是否必选 | 参数类型 | 参数描述 |
|---|---|---|---|
| execution_id | 是 | String | 执行ID,可以为create_execution接口的返回值。 |
返回值
响应中含有一个execution结构,建议通过response.json()方式获取返回值,结构如表1所示。
| 参数 | 参数类型 | 参数描述 |
|---|---|---|
| execution | JSONObject | execution基本属性,详见表3。 |
| object | JSONObject | k8s execution部分,详见表3 K8s execution结构。 |
| status | JSONObject | 节点状态,详见表11, 如果为空,则不返回。 |
| enterprise_project | JSONObjec | 企业项目,详见表表2 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| guid | String | execution guid。 |
| name | String | execution名称。 |
| namespace | String | execution所属命名空间。 |
| cluster_name | String | execution所属集群名称。 |
| cluster_id | String | execution所属集群ID。 |
| project_id | String | execution所属项目ID。 |
| domain_id | String | execution所属租户ID。 |
| description | String | execution描述。 |
| status | String | execution状态:
|
| workflow_id | String | 创建execution的流程ID。 |
| workflow_name | String | 创建execution的流程名称。 |
| workflow_scope | String | 创建execution的流程使用范围。 |
| inputs_json | String | execution输入。 |
| outputs_json | String | execution输出。 |
| image | String | 流程拓扑图。 |
| time_duration | int | 处理持续时间。 |
| sfs_volume_name | String | 中间件存储卷名称。 |
| job_type | String | execution的任务类型,可选值为:
|
| target | String | execution的运行环境,可选值为:
|
| create_at | String | execution创建时间。 |
| update_at | String | execution更新时间。 |
| label | Dictionary | 标签集合 |
| resources | Dictionary | execution消耗的资源和时间比,该时间比表示execution的实际执行时间所占总时间(包括执行时间、调度时间、失败处理时间等时间总和)的百分比,其中百分号已省略 |
| priority | int | execution的优先级,取值范围[0,999],默认为0 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| kind | String | 值为“execution”,表示是execution类型。 |
| apiVersion | String | 值为“gene.kubedag/v1alpha1”,表示api版本。 |
| metadata | execution的元属性。 | |
| spec | execution的创建细节属性。 | |
| status | execution的运行状态。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| name | String | execution名字,与表2中name字段一致。 |
| namespace | String | execution所属命名空间。 |
| selfLink | String | 访问该资源的连接。 |
| uid | String | execution资源的ID,与表2的guid字段一致。 |
| annotations | JSONObject | execution的特殊属性。 |
| resourceVersion等其余字段 | - | k8s自带属性。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| metadata | JSONObject,参见表7 | execution的元信息。 |
| actionName | String | excution操作的名称。
|
| timeoutInMinutes | int | execution的超时时间。 |
| onFailureStrategy | String | execution的超时重试逻辑:
|
| objectData | String | execution所使用的workflow数据,base64编码。 |
| location | String | 指定的execution执行者的容器ip。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| labels | JSONObject,内部每个key-value表示有个名为key值为value的标签 | execution的标签,标签与创建时的stack.spec.selector.matchlabels一致。 |
| namespace | String | 命名空间。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| actionName | String | 操作的名称。
|
| progress | int | 执行进度。 |
| objectStatus | ActionStatus | 操作的总体执行进度,表8 ExecutionStatus ActionStatus结构。 |
| subObjectStatuses | JSONObject | 分步操作的执行进度, 每个key-value结构表示key对应的节点的执行进度,value为表9 ExecutionStatus SubActionStatus结构 。 |
| elementStatuses | JSONObject | 各步骤的实际状态。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| phase | String | 该操作步骤的执行状态:
|
| message | String | 详细的出错信息。 |
| reason | String | 简短的CamelCase格式的错误描述信息。 |
| updateAt | String | 以RFC3339格式表示的信息更新的UTC时间戳。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| phase | String | 该操作步骤的执行状态:
|
| message | String | 详细的出错信息。 |
| reason | String | 简短的CamelCase格式的错误描述信息。 |
| updateAt | String | 以RFC3339格式表示的信息更新的UTC时间戳。 |
| subActionName | String | 操作的名称。 |
| createAt | String | 以RFC3339格式表示的信息创建的UTC时间戳。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| node_number | int | excution中步骤数量。 |
| finished_node_number | int | 已完成步骤个数。 |
| actual_node_status | JSONObject,详见表12 | 各步骤的状态。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| name | String | 节点名称。 |
| status | String | 该操作步骤的执行状态:
|
| sub_job_num | int | 子job的数量。 |
| finished_sub_job_num | int | 已完成子job的数量。 |
| sub_job_status | map | 子job的状态:
|
| time_duration | int | 持续时间。 |
| resources | map | job在持续时间内的资源消耗情况:
|