全部产品
Search
文档中心

开源大数据平台E-MapReduce:GetRayJob - 获取Ray Job信息

更新时间:Jun 11, 2026

获取Ray Job信息。

调试

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

调试

授权信息

当前API暂无授权信息透出。

请求语法

GET /api/v1/workspaces/{workspaceId}/rayJob/{submissionId} HTTP/1.1

路径参数

名称

类型

必填

描述

示例值

workspaceId

string

工作空间 ID。

w-d2d82aa09155

submissionId

string

Ray Job 的 id。

rj-xxxxxxxxxx

请求参数

名称

类型

必填

描述

示例值

当前API无需请求参数

返回参数

名称

类型

描述

示例值

object

Schema of Response

requestId

string

请求 ID。

DD6B1B2A-5837-5237-ABE4-FF0C8944

submissionId

string

Ray Job 的 id。

rj-xxxxxxxxxx

name

string

Ray 集群名称。

myRayCluster

displayReleaseVersion

string

Ray 引擎版本。

err-1.2.0 (Ray 2.55.1, Python 3.12)

tags

array

标签。

Tag

标签。

status

string

任务状态

  • Submitted 已提交。

  • Pending:集群创建中。

  • Running:任务运行中。

  • Succeeded:任务已成功。

  • Failed:任务已失败。

  • Cancelling:取消中。

  • Cancelled:已取消。

  • Timeout:超时取消。

Running

message

string

执行信息。

Job finished successfully.

entrypoint

string

启动命令。

python main.py

submitTime

integer

任务提交时间,Unix 时间戳,单位毫秒。

1750327082303

startTime

integer

启动时间,Unix 时间戳,单位毫秒。

1750327083303

endTime

integer

任务结束时间,Unix 时间戳,单位毫秒。

1762949372000

duration

integer

任务持续时间,单位秒。

2459764

networkServiceName

string

网络连接名称。

vpc

runtimeEnvJson

string

Ray runtime environment JSON 字符串。

{"pip":["requests==2.26.0","pendulum==2.1.2"],"env_vars":{"KEY":"VALUE"}}

workingDir

string

任务代码工作目录 URL。

oss://mybucket/hello.zip

submissionMode

string

提交作业方式。

HTTPMode

metadataJson

string

任务元数据 JSON 字符串。

{"owner": "alice"}

entrypointNumCpus

string

入口任务申请的 CPU 数量。

1

entrypointNumGpus

string

入口任务申请的 GPU 数量。

0

entrypointMemory

string

入口任务申请的内存大小。

4Gi

entrypointResources

string

入口任务自定义资源请求 JSON 字符串。

{"fpu": 1}

shutdownAfterJobFinishes

boolean

任务完成后是否自动销毁临时集群,默认 true。

true

ttlSecondsAfterFinished

integer

集群销毁前等待秒数,shutdownAfterJobFinishes 为 true 时有效。

60

activeDeadlineSeconds

integer

超时时间。

3600

volumeIds

array

纳管文件 id 列表。

string

纳管文件 id。

vol-123456789

backoffLimit

integer

失败重试次数,当前固定为 0。

2

headSpec

object

Ray 集群 Head 节点参数。

replica

integer

节点数量。

1

enableAutoScaling

boolean

Worker 节点是否开启自动扩缩容。

true

idleTimeoutSeconds

integer

开启自动扩缩容后 Worker 节点 Idle 时间。

60

queueName

string

队列名称。

root_queue

cpu

string

CPU 核数。

2

memory

string

内存,单位 Gi。

8Gi

gpuSpec

string

gpu 机型。

ecs.gn6i-c4g1.xlarge

workerSpecs

array<object>

Ray 集群 Worker 节点信息。

object

Ray 集群 Worker 节点信息结构体。

groupName

string

Worker 节点组名称。

WorkerGroup1

replica

integer

Worker 节点数量。

1

minReplica

integer

Worker 最小数量。

1

maxReplica

integer

Worker 最大数量。

10

queueName

string

队列名称。

root_queue

cpu

string

CPU 核数。

2

memory

string

内存,单位 Gi。

8Gi

gpuSpec

string

gpu 机型。

ecs.gn6i-c4g1.xlarge

extraParam

string

额外参数,json 格式。

{"userDefinedFiles": "oss://mybucket/artifact/config.json,oss://mybucket/artifact/config2.json", "userRequirementsFile": "oss://mybucket/requirements.txt"}

creatorName

string

创建者昵称。

Alice

dashboardUrl

string

Ray 集群 Dashboard 链接,Ray 集群状态为 Running 时为 Runtime UI,状态为 Deleted 后为 History UI,仅 err-1.2.0 及以上版本支持 History UI。

https://emr-ray-gateway-cn-hangzhou.aliyuncs.com/workspace/w-xxxxxxxx/raycluster/ray-xxxxxx/dashboard?token=xxxxxx

logBucketName

string

存放日志的 bucket 名称。

ss-ray-cn-hangzhou

logPath

string

存放日志的路径。

w-xxxxxxx/ray/logs/xxxxxx/

cuHours

number

消耗的 cu 资源,在集群释放后十分钟后返回。

1899

guHours

object

消耗的 gpu 时间,当前为空。

gpuSpec

string

gpu 机型。

ecs.gn6i-c4g1.xlarge

gpuHours

number

消耗的 gpu 时间。

2.6

dashboardUrlExtra

array

额外的 dashboard UI 链接,当前为空。

string

额外的 dashboard UI 链接,当前为空。

-

clusterState

string

对应的 Ray 集群的状态。

  • Deleted:已删除。

  • Submitted:已提交未开始创建。

  • Pending:创建中。

  • Running:运行中。

Running

taskBizId

string

数据开发任务 ID。

TSK-682e0112f6f24d9f9305b92174846985

示例

正常返回示例

JSON格式

{
  "requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944",
  "submissionId": "rj-xxxxxxxxxx",
  "name": "myRayCluster",
  "displayReleaseVersion": "err-1.2.0 (Ray 2.55.1, Python 3.12)",
  "tags": [
    {
      "key": "workflowId",
      "value": "wf-123test"
    }
  ],
  "status": "Running",
  "message": "Job finished successfully.",
  "entrypoint": "python main.py",
  "submitTime": 1750327082303,
  "startTime": 1750327083303,
  "endTime": 1762949372000,
  "duration": 2459764,
  "networkServiceName": "vpc",
  "runtimeEnvJson": "{\"pip\":[\"requests==2.26.0\",\"pendulum==2.1.2\"],\"env_vars\":{\"KEY\":\"VALUE\"}}",
  "workingDir": "oss://mybucket/hello.zip",
  "submissionMode": "HTTPMode",
  "metadataJson": "{\"owner\": \"alice\"}",
  "entrypointNumCpus": "1",
  "entrypointNumGpus": "0",
  "entrypointMemory": "4Gi",
  "entrypointResources": "{\"fpu\": 1}",
  "shutdownAfterJobFinishes": true,
  "ttlSecondsAfterFinished": 60,
  "activeDeadlineSeconds": 3600,
  "volumeIds": [
    "vol-123456789"
  ],
  "backoffLimit": 2,
  "headSpec": {
    "replica": 1,
    "enableAutoScaling": true,
    "idleTimeoutSeconds": 60,
    "queueName": "root_queue",
    "cpu": "2",
    "memory": "8Gi",
    "gpuSpec": "ecs.gn6i-c4g1.xlarge"
  },
  "workerSpecs": [
    {
      "groupName": "WorkerGroup1",
      "replica": 1,
      "minReplica": 1,
      "maxReplica": 10,
      "queueName": "root_queue",
      "cpu": "2",
      "memory": "8Gi",
      "gpuSpec": "ecs.gn6i-c4g1.xlarge"
    }
  ],
  "extraParam": "{\"userDefinedFiles\": \"oss://mybucket/artifact/config.json,oss://mybucket/artifact/config2.json\", \"userRequirementsFile\": \"oss://mybucket/requirements.txt\"}",
  "creatorName": "Alice",
  "dashboardUrl": "https://emr-ray-gateway-cn-hangzhou.aliyuncs.com/workspace/w-xxxxxxxx/raycluster/ray-xxxxxx/dashboard?token=xxxxxx",
  "logBucketName": "ss-ray-cn-hangzhou",
  "logPath": "w-xxxxxxx/ray/logs/xxxxxx/",
  "cuHours": 1899,
  "guHours": {
    "gpuSpec": "ecs.gn6i-c4g1.xlarge",
    "gpuHours": 2.6
  },
  "dashboardUrlExtra": [
    "-"
  ],
  "clusterState": "Running",
  "taskBizId": "TSK-682e0112f6f24d9f9305b92174846985"
}

错误码

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

变更历史

更多信息,参考变更详情