更新时间:2022-04-16 GMT+08:00
分享

查询作业执行计划

功能介绍

该API用于查询作业执行计划。

调试

您可以在API Explorer中调试该接口。

URI

  • URI格式

    GET /v1.0/{project_id}/streaming/jobs/{job_id}/execute-graph

  • 参数说明
    表1 URI参数说明

    参数名称

    是否必选

    参数类型

    说明

    project_id

    String

    项目编号,用于资源隔离。获取方式请参考获取项目ID

    job_id

    Long

    作业ID。

请求消息

无请求参数。

响应消息

表2 响应参数说明

参数名称

是否必选

参数类型

说明

is_success

Boolean

请求是否成功.

message

String

消息内容。

execute_graph

Object

查询作业计划的响应参数。具体请参考表3

表3 execute_graph参数说明

参数名称

是否可选

参数类型

说明

jid

String

flink作业id。

name

String

flink作业名字。

isStoppable

Boolean

是否可停止。

state

String

作业运行状态。

start-time

Long

作业启动时间。

end-time

Long

作业停止时间。

duration

Long

作业运行时长。

示例

  • 请求样例
    None
  • 响应样例
    {
        "is_success": "true",
        "message": "查询作业执行流图成功",
        "execute_graph": {
            "jid": "4e966f43f2c90b0e1bf3188ecf55504b",
            "name": "",
            "isStoppable": false,
            "state": "RUNNING",
            "start-time": 1578904488436,
            "end-time": -1,
            "duration": 516274,
            "now": 1578905004710,
            "timestamps": {
                "FAILING": 0,
                "SUSPENDING": 0,
                "FAILED": 0,
                "FINISHED": 0,
                "RESTARTING": 0,
                "RUNNING": 1578904488665,
                "CANCELED": 0,
                "SUSPENDED": 0,
                "CREATED": 1578904488436,
                "CANCELLING": 0,
                "RECONCILING": 0
            },
            "vertices": [
                {
                    "id": "bc764cd8ddf7a0cff126f51c16239658",
                    "name": "Source: DIS_128_CAR_INFOS",
                    "parallelism": 1,
                    "status": "RUNNING",
                    "start-time": 1578904505130,
                    "end-time": -1,
                    "duration": 499580,
                    "tasks": {
                        "SCHEDULED": 0,
                        "RUNNING": 1,
                        "RECONCILING": 0,
                        "FINISHED": 0,
                        "DEPLOYING": 0,
                        "CREATED": 0,
                        "CANCELING": 0,
                        "FAILED": 0,
                        "CANCELED": 0
                    },
                    "metrics": {
                        "read-bytes": 0,
                        "read-bytes-complete": true,
                        "write-bytes": 0,
                        "write-bytes-complete": true,
                        "read-records": 0,
                        "read-records-complete": true,
                        "write-records": 50,
                        "write-records-complete": true
                    },
                    "backpressure-level": "ok"
                },
                {
                    "id": "6cdc5bb954874d922eaee11a8e7b5dd5",
                    "name": "Source: Custom Source -> select: (_UTF-16LE'1' AS CAR_ID, _UTF-16LE'lilei' AS CAR_OWNER, _UTF-16LE'bmw320i' AS CAR_BRAND, 28 AS CAR_PRICE) -> to: Tuple2 -> Flat Map",
                    "parallelism": 1,
                    "status": "FINISHED",
                    "start-time": 1578904505138,
                    "end-time": 1578904506009,
                    "duration": 871,
                    "tasks": {
                        "SCHEDULED": 0,
                        "RUNNING": 0,
                        "RECONCILING": 0,
                        "FINISHED": 1,
                        "DEPLOYING": 0,
                        "CREATED": 0,
                        "CANCELING": 0,
                        "FAILED": 0,
                        "CANCELED": 0
                    },
                    "metrics": {
                        "read-bytes": 0,
                        "read-bytes-complete": true,
                        "write-bytes": 0,
                        "write-bytes-complete": true,
                        "read-records": 0,
                        "read-records-complete": true,
                        "write-records": 1,
                        "write-records-complete": true
                    }
                },
                {
                    "id": "2963852293169ba90d9d1e7d6308db5c",
                    "name": "Source: Custom Source -> select: (_UTF-16LE'2' AS CAR_ID, _UTF-16LE'hanmeimei' AS CAR_OWNER, _UTF-16LE'audia4' AS CAR_BRAND, 27 AS CAR_PRICE) -> to: Tuple2 -> Flat Map",
                    "parallelism": 1,
                    "status": "FINISHED",
                    "start-time": 1578904505140,
                    "end-time": 1578904506017,
                    "duration": 877,
                    "tasks": {
                        "SCHEDULED": 0,
                        "RUNNING": 0,
                        "RECONCILING": 0,
                        "FINISHED": 1,
                        "DEPLOYING": 0,
                        "CREATED": 0,
                        "CANCELING": 0,
                        "FAILED": 0,
                        "CANCELED": 0
                    },
                    "metrics": {
                        "read-bytes": 0,
                        "read-bytes-complete": true,
                        "write-bytes": 0,
                        "write-bytes-complete": true,
                        "read-records": 0,
                        "read-records-complete": true,
                        "write-records": 1,
                        "write-records-complete": true
                    }
                },
                {
                    "id": "c9235a26195589826000b27f7d761f13",
                    "name": "Map -> where: (AND(LIKE(CAR_BRAND, _UTF-16LE'audi%'), <(CAR_PRICE, 30))), select: (CAR_ID, CAR_OWNER, CAR_BRAND, CAR_PRICE) -> to: Tuple2 -> Flat Map",
                    "parallelism": 1,
                    "status": "RUNNING",
                    "start-time": 1578904505141,
                    "end-time": -1,
                    "duration": 499569,
                    "tasks": {
                        "SCHEDULED": 0,
                        "RUNNING": 1,
                        "RECONCILING": 0,
                        "FINISHED": 0,
                        "DEPLOYING": 0,
                        "CREATED": 0,
                        "CANCELING": 0,
                        "FAILED": 0,
                        "CANCELED": 0
                    },
                    "metrics": {
                        "read-bytes": 1495,
                        "read-bytes-complete": true,
                        "write-bytes": 0,
                        "write-bytes-complete": true,
                        "read-records": 50,
                        "read-records-complete": true,
                        "write-records": 49,
                        "write-records-complete": true
                    },
                    "backpressure-level": "ok"
                },
                {
                    "id": "15262ed2e480542a546ce9514170c8bf",
                    "name": "Sink: AUDI_CHEAPER_THAN_30W",
                    "parallelism": 1,
                    "status": "RUNNING",
                    "start-time": 1578904505276,
                    "end-time": -1,
                    "duration": 499434,
                    "tasks": {
                        "SCHEDULED": 0,
                        "RUNNING": 1,
                        "RECONCILING": 0,
                        "FINISHED": 0,
                        "DEPLOYING": 0,
                        "CREATED": 0,
                        "CANCELING": 0,
                        "FAILED": 0,
                        "CANCELED": 0
                    },
                    "metrics": {
                        "read-bytes": 2695,
                        "read-bytes-complete": true,
                        "write-bytes": 0,
                        "write-bytes-complete": true,
                        "read-records": 49,
                        "read-records-complete": true,
                        "write-records": 0,
                        "write-records-complete": true
                    },
                    "backpressure-level": "ok"
                },
                {
                    "id": "6a739966c5220e4a0f256fe41d02793b",
                    "name": "Sink: CAR_INFO_DATA",
                    "parallelism": 1,
                    "status": "FINISHED",
                    "start-time": 1578904505277,
                    "end-time": 1578904506843,
                    "duration": 1566,
                    "tasks": {
                        "SCHEDULED": 0,
                        "RUNNING": 0,
                        "RECONCILING": 0,
                        "FINISHED": 1,
                        "DEPLOYING": 0,
                        "CREATED": 0,
                        "CANCELING": 0,
                        "FAILED": 0,
                        "CANCELED": 0
                    },
                    "metrics": {
                        "read-bytes": 56,
                        "read-bytes-complete": true,
                        "write-bytes": 0,
                        "write-bytes-complete": true,
                        "read-records": 1,
                        "read-records-complete": true,
                        "write-records": 0,
                        "write-records-complete": true
                    }
                },
                {
                    "id": "ac1799ab18d143a12ca3550fb1dfc3a5",
                    "name": "Sink: CAR_INFO_DATA",
                    "parallelism": 1,
                    "status": "FINISHED",
                    "start-time": 1578904505279,
                    "end-time": 1578904506711,
                    "duration": 1432,
                    "tasks": {
                        "SCHEDULED": 0,
                        "RUNNING": 0,
                        "RECONCILING": 0,
                        "FINISHED": 1,
                        "DEPLOYING": 0,
                        "CREATED": 0,
                        "CANCELING": 0,
                        "FAILED": 0,
                        "CANCELED": 0
                    },
                    "metrics": {
                        "read-bytes": 59,
                        "read-bytes-complete": true,
                        "write-bytes": 0,
                        "write-bytes-complete": true,
                        "read-records": 1,
                        "read-records-complete": true,
                        "write-records": 0,
                        "write-records-complete": true
                    }
                }
            ],
            "status-counts": {
                "SCHEDULED": 0,
                "RUNNING": 3,
                "RECONCILING": 0,
                "FINISHED": 4,
                "DEPLOYING": 0,
                "CREATED": 0,
                "CANCELING": 0,
                "FAILED": 0,
                "CANCELED": 0
            },
            "jmx-metric-port": -1,
            "plan": {
                "jid": "4e966f43f2c90b0e1bf3188ecf55504b",
                "name": "",
                "nodes": [
                    {
                        "id": "15262ed2e480542a546ce9514170c8bf",
                        "parallelism": 1,
                        "operator": "",
                        "operator_strategy": "",
                        "description": "Sink: AUDI_CHEAPER_THAN_30W",
                        "inputs": [
                            {
                                "num": 0,
                                "id": "c9235a26195589826000b27f7d761f13",
                                "ship_strategy": "FORWARD",
                                "exchange": "pipelined_bounded"
                            }
                        ],
                        "optimizer_properties": {}
                    },
                    {
                        "id": "c9235a26195589826000b27f7d761f13",
                        "parallelism": 1,
                        "operator": "",
                        "operator_strategy": "",
                        "description": "Map -&gt; where: (AND(LIKE(CAR_BRAND, _UTF-16LE'audi%'), &lt;(CAR_PRICE, 30))), select: (CAR_ID, CAR_OWNER, CAR_BRAND, CAR_PRICE) -&gt; to: Tuple2 -&gt; Flat Map",
                        "inputs": [
                            {
                                "num": 0,
                                "id": "bc764cd8ddf7a0cff126f51c16239658",
                                "ship_strategy": "FORWARD",
                                "exchange": "pipelined_bounded"
                            }
                        ],
                        "optimizer_properties": {}
                    },
                    {
                        "id": "bc764cd8ddf7a0cff126f51c16239658",
                        "parallelism": 1,
                        "operator": "",
                        "operator_strategy": "",
                        "description": "Source: DIS_128_CAR_INFOS",
                        "optimizer_properties": {}
                    },
                    {
                        "id": "6a739966c5220e4a0f256fe41d02793b",
                        "parallelism": 1,
                        "operator": "",
                        "operator_strategy": "",
                        "description": "Sink: CAR_INFO_DATA",
                        "inputs": [
                            {
                                "num": 0,
                                "id": "6cdc5bb954874d922eaee11a8e7b5dd5",
                                "ship_strategy": "FORWARD",
                                "exchange": "pipelined_bounded"
                            }
                        ],
                        "optimizer_properties": {}
                    },
                    {
                        "id": "6cdc5bb954874d922eaee11a8e7b5dd5",
                        "parallelism": 1,
                        "operator": "",
                        "operator_strategy": "",
                        "description": "Source: Custom Source -&gt; select: (_UTF-16LE'1' AS CAR_ID, _UTF-16LE'lilei' AS CAR_OWNER, _UTF-16LE'bmw320i' AS CAR_BRAND, 28 AS CAR_PRICE) -&gt; to: Tuple2 -&gt; Flat Map",
                        "optimizer_properties": {}
                    },
                    {
                        "id": "ac1799ab18d143a12ca3550fb1dfc3a5",
                        "parallelism": 1,
                        "operator": "",
                        "operator_strategy": "",
                        "description": "Sink: CAR_INFO_DATA",
                        "inputs": [
                            {
                                "num": 0,
                                "id": "2963852293169ba90d9d1e7d6308db5c",
                                "ship_strategy": "FORWARD",
                                "exchange": "pipelined_bounded"
                            }
                        ],
                        "optimizer_properties": {}
                    },
                    {
                        "id": "2963852293169ba90d9d1e7d6308db5c",
                        "parallelism": 1,
                        "operator": "",
                        "operator_strategy": "",
                        "description": "Source: Custom Source -&gt; select: (_UTF-16LE'2' AS CAR_ID, _UTF-16LE'hanmeimei' AS CAR_OWNER, _UTF-16LE'audia4' AS CAR_BRAND, 27 AS CAR_PRICE) -&gt; to: Tuple2 -&gt; Flat Map",
                        "optimizer_properties": {}
                    }
                ]
            }
        }
    }

状态码

表4 状态码

状态码

描述

200

查询作业执行计划成功。

400

输入参数无效。

错误码

调用接口出错后,将不会返回上述结果,而是返回错误码和错误信息,更多介绍请参见错误码

分享:

    相关文档

    相关产品

close