你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Spark Batch - Get Spark Batch Job

获取单个 Spark 批处理作业。

GET {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}
GET {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}?detailed={detailed}

URI 参数

名称 必需 类型 说明
batchId
path True

integer (int32)

批处理作业的标识符。

endpoint
path True

string

工作区开发终结点,例如 https://myworkspace.dev.azuresynapse.net

livyApiVersion
path True

string

请求的有效 API 版本。

sparkPoolName
path True

string

Spark 池的名称。

detailed
query

boolean

可选查询参数,指定是否在纯 livy 之外返回详细响应。

响应

名称 类型 说明
200 OK

SparkBatchJob

成功

示例

Gets a single spark batch job.

示例请求

GET myWorkspace.dev.azuresynapse.net/livyApi/versions/2020-12-01/sparkPools/mySparkPool/batches/123?detailed=True

示例响应

{
  "livyInfo": null,
  "name": "jobname",
  "workspaceName": "myWorkspace",
  "sparkPoolName": "mySparkPool",
  "submitterName": "thetime",
  "submitterId": "thesubmitterid",
  "artifactId": "fill in here",
  "jobType": "SparkBatch",
  "result": "Failed",
  "schedulerInfo": null,
  "pluginInfo": null,
  "errorInfo": [],
  "tags": null,
  "id": 1,
  "appId": "fill in here",
  "appInfo": null,
  "state": "the state",
  "log": []
}

定义

名称 说明
LivyStates

批处理状态

PluginCurrentState
SchedulerCurrentState
SparkBatchJob
SparkBatchJobResultType

Spark 批处理作业结果。

SparkBatchJobState
SparkErrorSource
SparkJobType

作业类型。

SparkRequest
SparkScheduler
SparkServiceError
SparkServicePlugin

LivyStates

批处理状态

说明
busy
dead
error
idle
killed
not_started
recovering
running
shutting_down
starting
success

PluginCurrentState

说明
Cleanup
Ended
Monitoring
Preparation
Queued
ResourceAcquisition
Submission

SchedulerCurrentState

说明
Ended
Queued
Scheduled

SparkBatchJob

名称 类型 说明
appId

string

此会话的应用程序 ID

appInfo

object

详细的应用程序信息。

artifactId

string

项目标识符。

errorInfo

SparkServiceError[]

错误信息。

id

integer (int32)

会话 ID。

jobType

SparkJobType

作业类型。

livyInfo

SparkBatchJobState

log

string[]

日志行。

name

string

批名称。

pluginInfo

SparkServicePlugin

插件信息。

result

SparkBatchJobResultType

Spark 批处理作业结果。

schedulerInfo

SparkScheduler

计划程序信息。

sparkPoolName

string

Spark 池名称。

state

LivyStates

批处理状态

submitterId

string

提交者标识符。

submitterName

string

提交者名称。

tags

object

标记。

workspaceName

string

工作区名称。

SparkBatchJobResultType

Spark 批处理作业结果。

说明
Cancelled
Failed
Succeeded
Uncertain

SparkBatchJobState

名称 类型 说明
currentState

string

Spark 作业状态。

deadAt

string (date-time)

当时,第一次看到“死”的利维状态。

jobCreationRequest

SparkRequest

killedAt

string (date-time)

第一次看到“杀”利维状态的时间。

notStartedAt

string (date-time)

首次看到“not_started”livy状态的时间。

recoveringAt

string (date-time)

首次看到“恢复”利维状态的时间。

runningAt

string (date-time)

首次看到“正在运行”的利维状态的时间。

startingAt

string (date-time)

首次看到“开始”livy 状态的时间。

successAt

string (date-time)

首次看到“成功”利维状态的时间。

SparkErrorSource

说明
Dependency
System
Unknown
User

SparkJobType

作业类型。

说明
SparkBatch
SparkSession

SparkRequest

名称 类型 说明
archives

string[]

args

string[]

className

string

conf

object

driverCores

integer (int32)

driverMemory

string

executorCores

integer (int32)

executorMemory

string

file

string

files

string[]

jars

string[]

name

string

numExecutors

integer (int32)

pyFiles

string[]

SparkScheduler

名称 类型 说明
cancellationRequestedAt

string (date-time)

currentState

SchedulerCurrentState

endedAt

string (date-time)

scheduledAt

string (date-time)

submittedAt

string (date-time)

SparkServiceError

名称 类型 说明
errorCode

string

message

string

source

SparkErrorSource

SparkServicePlugin

名称 类型 说明
cleanupStartedAt

string (date-time)

currentState

PluginCurrentState

monitoringStartedAt

string (date-time)

preparationStartedAt

string (date-time)

resourceAcquisitionStartedAt

string (date-time)

submissionStartedAt

string (date-time)