全部產品
Search
文件中心

E-MapReduce:GetRayJob - 擷取Ray Job資訊

更新時間:Jun 12, 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"
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情