调用DescribeFlowInstance接口,获取工作流实例信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeFlowInstance

系统规定参数。对于您自行拼凑HTTP或HTTPS URL发起的API请求,该参数为必选参数。取值:DescribeFlowInstance。

Id String FI-7CAF9709CD32****

工作流实例ID。

ProjectId String FP-7A1018ADE917****

项目ID。

RegionId String cn-hangzhou

地域ID。

返回数据

名称 类型 示例值 描述
ClusterId String C-F32FB31D8295****

集群ID。

Duration Long 12000

运行持续时间,单位ms

EndTime Long 1540796248000

运行结束时间。

FlowId String F-35683D0E4573****

工作流ID。

FlowName String flow-hive

工作流名称。

GmtCreate Long 1540796248000

创建时间。

GmtModified Long 1540796248000

修改时间。

Graph String {"nodes":[{"shape":"startControlNode","size":"80*34","spmAnchorId":"0.0.0.i0.766645eb2cmNtQ","x":500,"y":250,"index":0,"id":"48d474ea","attribute":{"type":"START"},"type":"node"},{"shape":"hiveSQLJobNode","size":"170*34","spmAnchorId":"5176.8250060.0.i11.499128d0KWdQvq","x":515,"y":334.5,"index":1,"id":"2f089966","label":"hive-test","attribute":{"jobId":"FJ-C6C794219DE652B9","type":"JOB","jobType":"HIVE_SQL"},"type":"node","config":{"hostName":"","clusterId":""}},{"shape":"endControlNode","size":"80*34","spmAnchorId":"5176.8250060.0.i15.499128d0KWdQvq","x":532,"y":453.5,"index":2,"id":"ac092a54","attribute":{"type":"END"},"type":"node"}],"edges":[{"sourceAnchor":0,"targetAnchor":0,"index":3,"source":"48d474ea","id":"77e6117c","target":"2f089966"},{"sourceAnchor":1,"targetAnchor":0,"index":4,"source":"2f089966","id":"95ba3716","target":"ac092a54"}]}

图形信息。

Id String FI-7CAF9709CD32****

工作流实例ID。

NodeInstance Array

工作流实例运行的节点实例。

NodeInstance
ClusterId String C-F32FB31D8295****

集群ID。

Duration Long 11000

运行持续时间。

EndTime Long 1540796248000

运行结束时间。

ExternalId String application_1540362938289_1858

外部ID。例如启动器ApplicationId

ExternalInfo String empty

外部信息。例如运行作业的错误诊断信息。

ExternalStatus String SUCCESS

外部状态:

  • SUBMITTED(已提交)
  • RUNNING(运行中)
  • SUCCESS(执行成功)
  • FAIL(执行失败)
  • KILL_FAIL(终止失败)
  • KILL_SUCCESS(终止成功)
FailAct String STOP

失败策略:

  • STOP(终止工作流)
  • CONTINUE(跳过)
GmtCreate Long 1540796236000

创建时间。

GmtModified Long 1540796247000

修改时间。

HostName String emr-header-1.cluster-12345

节点实例运行所在主机的名称。您可以登录主机使用hostname命令查看主机名称。

Id String FNI-9D14A7CCF26****

节点实例ID。

JobId String FJ-C6C794219DE6****

对应的作业ID。

JobName String hive-test

对应的作业名称。

JobType String HIVE_SQL

对应的作业类型。

MaxRetry String 0

最大重试次数。

NodeName String 2f089966

节点名称。

Pending Boolean true

是否结束。

ProjectId String FP-7A1018ADE917****

项目ID。

Retries Integer 0

重试次数。

RetryInterval String 15

重试间隔,单位s。

StartTime Long 1540796237000

运行开始时间。

Status String OK

实例的执行状态:

  • PREP(等待启动)
  • SUBMITTING(提交中)
  • RUNNING(运行中)
  • DONE(已完成)
  • OK(执行成功)
  • FAILED(执行失败)
  • KILLED(已终止)
  • KILL_FAILED(终止失败)
  • START_RETRY(开始重试)
Type String JOB

节点类型:

  • JOB
  • CLUSTER
  • START
  • END
ProjectId String FP-7A1018ADE917****

项目ID。

RequestId String EDF99BA3-F7AF-49B2-ABA1-36430A31F482

请求ID。

StartTime Long 1540796236000

运行开始时间。

Status String SUCCEEDED

实例的执行状态:

  • PREP(准备中)
  • RUNNING(运行中)
  • SUCCEEDED(成功)
  • FAILED(失败)
  • KILLED(已终止)
  • SUSPENDED(暂停中)

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeFlowInstance
&Id=FI-7CAF9709CD32****
&ProjectId=FP-7A1018ADE917****
&RegionId=cn-hangzhou
&<公共请求参数>

正常返回示例

XML 格式

<Status>SUCCEEDED</Status>
<RequestId>EDF99BA3-F7AF-49B2-ABA1-36430A31F482</RequestId>
<EndTime>1540796248000</EndTime>
<ClusterId>C-F32FB31D8295****</ClusterId>
<GmtModified>1540796247000</GmtModified>
<StartTime>1540796236000</StartTime>
<ProjectId>FP-7A1018ADE917****</ProjectId>
<Duration>12000</Duration>
<FlowId>F-35683D0E4573****</FlowId>
<GmtCreate>1540796235000</GmtCreate>
<Graph>
    <nodes>
        <shape>startControlNode</shape>
        <size>80*34</size>
        <spmAnchorId>0.0.0.i0.766645eb2c****</spmAnchorId>
        <x>500</x>
        <y>250</y>
        <index>0</index>
        <id>48d4****</id>
        <attribute>
            <type>START</type>
        </attribute>
        <type>node</type>
    </nodes>
    <nodes>
        <shape>hiveSQLJobNode</shape>
        <size>170*34</size>
        <spmAnchorId>5176.8250060.0.i11.499128d0KW****</spmAnchorId>
        <x>515</x>
        <y>334.5</y>
        <index>1</index>
        <id>2f089966</id>
        <label>hive-test</label>
        <attribute>
            <jobId>FJ-C6C794219DE6****</jobId>
            <type>JOB</type>
            <jobType>HIVE_SQL</jobType>
        </attribute>
        <type>node</type>
        <config>
            <hostName/>
            <clusterId/>
        </config>
    </nodes>
    <nodes>
        <shape>endControlNode</shape>
        <size>80*34</size>
        <spmAnchorId>5176.8250060.0.i15.499128d0KW****</spmAnchorId>
        <x>532</x>
        <y>453.5</y>
        <index>2</index>
        <id>ac09****</id>
        <attribute>
            <type>END</type>
        </attribute>
        <type>node</type>
    </nodes>
    <edges>
        <sourceAnchor>0</sourceAnchor>
        <targetAnchor>0</targetAnchor>
        <index>3</index>
        <source>48d474ea</source>
        <id>77e6****</id>
        <target>2f089966</target>
    </edges>
    <edges>
        <sourceAnchor>1</sourceAnchor>
        <targetAnchor>0</targetAnchor>
        <index>4</index>
        <source>2f089966</source>
        <id>95ba****</id>
        <target>ac092a54</target>
    </edges>
</Graph>
<ScheduleTime>1596596400000</ScheduleTime>
<FlowName>flow-hive</FlowName>
<Id>FI-7CAF9709CD32****</Id>
<DependencyFlowList>
</DependencyFlowList>
<NodeInstance>
    <NodeInstance>
        <FailAct>STOP</FailAct>
        <Status>OK</Status>
        <EndTime>1540796236000</EndTime>
        <ClusterId>C-F32FB31D8295****</ClusterId>
        <NodeName>:start:</NodeName>
        <GmtModified>1540796236000</GmtModified>
        <StartTime>1540796236000</StartTime>
        <ProjectId>FP-7A1018ADE917****</ProjectId>
        <Duration>0</Duration>
        <MaxRetry>0</MaxRetry>
        <Type>START</Type>
        <GmtCreate>1540796236000</GmtCreate>
        <Retries>0</Retries>
        <Id>FNI-1286C1ED46C4****</Id>
        <HostName/>
        <Pending>false</Pending>
    </NodeInstance>
    <NodeInstance>
        <FailAct>STOP</FailAct>
        <Status>OK</Status>
        <EndTime>1540796248000</EndTime>
        <ClusterId>C-F32FB31D8295****</ClusterId>
        <NodeName>2f089966</NodeName>
        <ExternalId>application_1540362938289_1858</ExternalId>
        <JobName>hive-test</JobName>
        <GmtModified>1540796247000</GmtModified>
        <StartTime>1540796237000</StartTime>
        <ProjectId>FP-7A1018ADE917****</ProjectId>
        <Duration>11000</Duration>
        <MaxRetry>0</MaxRetry>
        <ExternalStatus>SUCCESS</ExternalStatus>
        <Type>JOB</Type>
        <GmtCreate>1540796236000</GmtCreate>
        <JobType>HIVE_SQL</JobType>
        <ExternalInfo/>
        <Retries>0</Retries>
        <RetryInterval>15</RetryInterval>
        <Id>FNI-9D14A7CCF268****</Id>
        <HostName>emr-header-1.cluster-500159692</HostName>
        <JobId>FJ-C6C794219DE6****</JobId>
        <Pending>false</Pending>
    </NodeInstance>
    <NodeInstance>
        <FailAct>STOP</FailAct>
        <Status>OK</Status>
        <EndTime>1540796248000</EndTime>
        <ClusterId>C-F32FB31D8295****</ClusterId>
        <NodeName>ac092a54</NodeName>
        <GmtModified>1540796247000</GmtModified>
        <StartTime>1540796248000</StartTime>
        <ProjectId>FP-7A1018ADE917****</ProjectId>
        <Duration>0</Duration>
        <MaxRetry>0</MaxRetry>
        <Type>END</Type>
        <GmtCreate>1540796247000</GmtCreate>
        <Retries>0</Retries>
        <Id>FNI-14C14E312AF9****</Id>
        <HostName/>
        <Pending>false</Pending>
    </NodeInstance>
</NodeInstance>

JSON 格式

{
        "Status": "SUCCEEDED",
        "RequestId": "EDF99BA3-F7AF-49B2-ABA1-36430A31F482",
        "EndTime": 1540796248000,
        "ClusterId": "C-F32FB31D8295****",
        "GmtModified": 1540796247000,
        "StartTime": 1540796236000,
        "ProjectId": "FP-7A1018ADE917****",
        "Duration": 12000,
        "FlowId": "F-35683D0E4573****",
        "GmtCreate": 1540796235000,
        "Graph": {
            "nodes": [
                {
                    "shape": "startControlNode",
                    "size": "80*34",
                    "spmAnchorId": "0.0.0.i0.766645eb2c****",
                    "x": 500,
                    "y": 250,
                    "index": 0,
                    "id": "48d4****",
                    "attribute": {
                        "type": "START"
                    },
                    "type": "node"
                },
                {
                    "shape": "hiveSQLJobNode",
                    "size": "170*34",
                    "spmAnchorId": "5176.8250060.0.i11.499128d0KW****",
                    "x": 515,
                    "y": 334.5,
                    "index": 1,
                    "id": "2f089966",
                    "label": "hive-test",
                    "attribute": {
                        "jobId": "FJ-C6C794219DE6****",
                        "type": "JOB",
                        "jobType": "HIVE_SQL"
                    },
                    "type": "node",
                    "config": {
                        "hostName": "",
                        "clusterId": ""
                    }
                },
                {
                    "shape": "endControlNode",
                    "size": "80*34",
                    "spmAnchorId": "5176.8250060.0.i15.499128d0KW****",
                    "x": 532,
                    "y": 453.5,
                    "index": 2,
                    "id": "ac09****",
                    "attribute": {
                        "type": "END"
                    },
                    "type": "node"
                }
            ],
            "edges": [
                {
                    "sourceAnchor": 0,
                    "targetAnchor": 0,
                    "index": 3,
                    "source": "48d474ea",
                    "id": "77e6****",
                    "target": "2f089966"
                },
                {
                    "sourceAnchor": 1,
                    "targetAnchor": 0,
                    "index": 4,
                    "source": "2f089966",
                    "id": "95ba****",
                    "target": "ac092a54"
                }
            ]
        },
        "ScheduleTime": 1596596400000,
        "FlowName": "flow-hive",
        "Id": "FI-7CAF9709CD32****",
        "DependencyFlowList": {
		"ParentFlow": []
	    },
        "NodeInstance": {
            "NodeInstance": [
                {
                    "FailAct": "STOP",
                    "Status": "OK",
                    "EndTime": 1540796236000,
                    "ClusterId": "C-F32FB31D8295****",
                    "NodeName": ":start:",
                    "GmtModified": 1540796236000,
                    "StartTime": 1540796236000,
                    "ProjectId": "FP-7A1018ADE917****",
                    "Duration": 0,
                    "MaxRetry": "0",
                    "Type": "START",
                    "GmtCreate": 1540796236000,
                    "Retries": 0,
                    "Id": "FNI-1286C1ED46C4****",
                    "HostName": "",
                    "Pending": false
                },
                {
                    "FailAct": "STOP",
                    "Status": "OK",
                    "EndTime": 1540796248000,
                    "ClusterId": "C-F32FB31D8295****",
                    "NodeName": "2f089966",
                    "ExternalId": "application_1540362938289_1858",
                    "JobName": "hive-test",
                    "GmtModified": 1540796247000,
                    "StartTime": 1540796237000,
                    "ProjectId": "FP-7A1018ADE917****",
                    "Duration": 11000,
                    "MaxRetry": "0",
                    "ExternalStatus": "SUCCESS",
                    "Type": "JOB",
                    "GmtCreate": 1540796236000,
                    "JobType": "HIVE_SQL",
                    "ExternalInfo": "",
                    "Retries": 0,
                    "RetryInterval": "15",
                    "Id": "FNI-9D14A7CCF268****",
                    "HostName": "emr-header-1.cluster-500159692",
                    "JobId": "FJ-C6C794219DE6****",
                    "Pending": false
                },
                {
                    "FailAct": "STOP",
                    "Status": "OK",
                    "EndTime": 1540796248000,
                    "ClusterId": "C-F32FB31D8295****",
                    "NodeName": "ac092a54",
                    "GmtModified": 1540796247000,
                    "StartTime": 1540796248000,
                    "ProjectId": "FP-7A1018ADE917****",
                    "Duration": 0,
                    "MaxRetry": "0",
                    "Type": "END",
                    "GmtCreate": 1540796247000,
                    "Retries": 0,
                    "Id": "FNI-14C14E312AF9****",
                    "HostName": "",
                    "Pending": false
                }
            ]
        } 
}

错误码

访问错误中心查看更多错误码。