GetJobInfo - 查看作业的基础信息

查看单个作业的基础信息。

调试

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

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
odps:GetJobInfoget
*Job
acs:odps:{#regionId}:{#accountId}:job/{#instanceId}

请求语法

GET /api/v1/jobs/{instanceId}/info HTTP/1.1

请求参数

名称类型必填描述示例值
instanceIdstring

作业 ID。

20230410****60gg

返回参数

名称类型描述示例值
object

PopResult

requestIdstring

请求 ID。

0be3e0bb16654558425251398e27a9
httpCodeinteger

HTTP 状态码。

  • 1xx:信息响应 - 请求已接收,正在处理中。
  • 2xx:成功 - 请求动作已被服务端成功接收、理解并接受。
  • 3xx:重定向 - 请求被重定向,采取进一步行动以完成请求。
  • 4xx:客户端错误 - 请求包含错误请求参、语法或特定请求条件无法满足。
  • 5xx:服务端错误 - 服务器由于其他原因无法满足请求。
200
errorCodestring

错误码。

OBJECT_NOT_EXIST
errorMsgstring

错误描述信息。

This object does not exist.
dataobject

返回结果。

tenantIdstring

租户 ID。

4784****5249
regionstring

地域 ID。

cn-shanghai
instanceIdstring

作业 ID。

20230410****60gg
jobOwnerstring

作业 Owner。

ALIYUN$7632***@aliyun.com
projectstring

项目名称。

dp_cdm_prod
jobTypestring

作业类型。

SQL
prioritylong

作业优先级。

1
statusstring

作业状态。

running
quotaNicknamestring

作业使用的计算配额(Quota)昵称。

os_bigdata
quotaTypestring

Quota 类型。

subscription
cuUsagelong

作业消耗的 CU 时,仅运行结束的作业有此值。

10
memoryUsagelong

作业消耗的内存时,仅运行结束的作业有此值。

40
submittedAtTimelong

作业提交时间。

1672112013
waitingTimelong

等待时长,作业从提交时间到开始运行时间的时长。

100
runningAtTimelong

作业开始运行时间,特指作业获取第一份计算资源的时间。对于运行时间过短或不消耗计算资源(如 DDL 语句)的作业,以作业提交时间替代。

1672112113
runningTimelong

运行时长,作业从开始运行时间到结束运行时间的时长。

800
endAtTimelong

作业运行结束时间。

1672112913
totalTimelong

总运行时长,作业从提交时间到结束时间总时长。

900
signaturestring

SQL 作业签名。可通过此签名查找 SQL 每次执行的 Instances。

20c1efb4a7caca1865f4aa784bb500efae74af04
extPlantFromstring

上游平台。

platform_3
extNodeIdstring

上游节点 ID。

node_4
extNodeOnDutystring

任务负责人账号 ID。

duty_2
inputBytesdouble

作业扫描量

1234
sceneResultsarray<object>

智能诊断结果。

sceneResultobject

智能诊断结果。

sceneTagstring

智能诊断结果标签。

SubscriptionLackResource
scenestring

智能诊断结果场景。

LackResource
typestring

智能诊断结果类型。

warning
summarystring

智能诊断结果简述。

Insufficient computing resources available for the job. Click to view details.
descriptionstring

智能诊断结果详情。

This job uses annual and monthly computing resources. It may be that the job is waiting for resources due to the large amount of overall job running data, many resources requested, and low job priority. Please go to Resource Consumption to view the specific situation. You can also go to Cost Optimization to see if you need to adjust resource configuration.
paramsobject

数据倾斜、数据膨胀节点信息。只有当诊断场景为数据倾斜、数据膨胀时返回此参数。

string

数据倾斜、数据膨胀节点信息。

"jobinsight_data_skew_node": "Worker M1#10000_0"
jobSubStatusListarray<object>

作业生命周期的子状态列表。

jobSubStatusListobject

作业子状态信息。

codeinteger

子状态的编码。

1010
startTimestring

子状态的开始时间。

2025-03-05 00:04:15.717364 +0800
descriptionstring

子状态的描述。

Waiting for scheduling

示例

正常返回示例

JSON格式

{
  "requestId": "0be3e0bb16654558425251398e27a9",
  "httpCode": 200,
  "errorCode": "OBJECT_NOT_EXIST",
  "errorMsg": "This object does not exist.",
  "data": {
    "tenantId": "4784****5249",
    "region": "cn-shanghai",
    "instanceId": "20230410****60gg",
    "jobOwner": "ALIYUN$7632***@aliyun.com\n",
    "project": "dp_cdm_prod",
    "jobType": "SQL\n",
    "priority": 1,
    "status": "running",
    "quotaNickname": "os_bigdata",
    "quotaType": "subscription",
    "cuUsage": 10,
    "memoryUsage": 40,
    "submittedAtTime": 1672112013,
    "waitingTime": 100,
    "runningAtTime": 1672112113,
    "runningTime": 800,
    "endAtTime": 1672112913,
    "totalTime": 900,
    "signature": "20c1efb4a7caca1865f4aa784bb500efae74af04",
    "extPlantFrom": "platform_3",
    "extNodeId": "node_4",
    "extNodeOnDuty": "duty_2",
    "inputBytes": 1234,
    "sceneResults": [
      {
        "sceneTag": "SubscriptionLackResource",
        "scene": "LackResource",
        "type": "warning",
        "summary": "\t\nInsufficient computing resources available for the job. Click to view details.",
        "description": "This job uses annual and monthly computing resources. It may be that the job is waiting for resources due to the large amount of overall job running data, many resources requested, and low job priority. Please go to Resource Consumption to view the specific situation. You can also go to Cost Optimization to see if you need to adjust resource configuration.",
        "params": {
          "key": "\"jobinsight_data_skew_node\": \"Worker M1#10000_0\"\n"
        }
      }
    ],
    "jobSubStatusList": [
      {
        "code": 1010,
        "startTime": "2025-03-05 00:04:15.717364 +0800",
        "description": "Waiting for scheduling"
      }
    ]
  }
}

错误码

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