Spark Batch - Get Spark Batch Jobs
List all spark batch jobs which are running under a particular spark pool.
GET {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches
GET {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches?from={from}&size={size}&detailed={detailed}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
The workspace development endpoint, for example |
livy
|
path | True |
string |
Valid api-version for the request. |
spark
|
path | True |
string |
Name of the spark pool. |
detailed
|
query |
boolean |
Optional query param specifying whether detailed response is returned beyond plain livy. |
|
from
|
query |
integer int32 |
Optional param specifying which index the list should begin from. |
|
size
|
query |
integer int32 |
Optional param specifying the size of the returned list.
|
Responses
Name | Type | Description |
---|---|---|
200 OK |
Success |
Examples
List all spark batch jobs
Sample request
GET myWorkspace.dev.azuresynapse.net/livyApi/versions/2020-12-01/sparkPools/mySparkPool/batches?from=0&size=2&detailed=True
Sample response
{
"from": 0,
"total": 2,
"sessions": []
}
Definitions
Name | Description |
---|---|
Livy |
The batch state |
Plugin |
|
Scheduler |
|
Spark |
|
Spark |
Response for batch list operation. |
Spark |
The Spark batch job result. |
Spark |
|
Spark |
|
Spark |
The job type. |
Spark |
|
Spark |
|
Spark |
|
Spark |
LivyStates
The batch state
Name | Type | Description |
---|---|---|
busy |
string |
|
dead |
string |
|
error |
string |
|
idle |
string |
|
killed |
string |
|
not_started |
string |
|
recovering |
string |
|
running |
string |
|
shutting_down |
string |
|
starting |
string |
|
success |
string |
PluginCurrentState
Name | Type | Description |
---|---|---|
Cleanup |
string |
|
Ended |
string |
|
Monitoring |
string |
|
Preparation |
string |
|
Queued |
string |
|
ResourceAcquisition |
string |
|
Submission |
string |
SchedulerCurrentState
Name | Type | Description |
---|---|---|
Ended |
string |
|
Queued |
string |
|
Scheduled |
string |
SparkBatchJob
Name | Type | Description |
---|---|---|
appId |
string |
The application id of this session |
appInfo |
object |
The detailed application info. |
artifactId |
string |
The artifact identifier. |
errorInfo |
The error information. |
|
id |
integer |
The session Id. |
jobType |
The job type. |
|
livyInfo | ||
log |
string[] |
The log lines. |
name |
string |
The batch name. |
pluginInfo |
The plugin information. |
|
result |
The Spark batch job result. |
|
schedulerInfo |
The scheduler information. |
|
sparkPoolName |
string |
The Spark pool name. |
state |
The batch state |
|
submitterId |
string |
The submitter identifier. |
submitterName |
string |
The submitter name. |
tags |
object |
The tags. |
workspaceName |
string |
The workspace name. |
SparkBatchJobCollection
Response for batch list operation.
Name | Type | Description |
---|---|---|
from |
integer |
The start index of fetched sessions. |
sessions |
Batch list |
|
total |
integer |
Number of sessions fetched. |
SparkBatchJobResultType
The Spark batch job result.
Name | Type | Description |
---|---|---|
Cancelled |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Uncertain |
string |
SparkBatchJobState
Name | Type | Description |
---|---|---|
currentState |
string |
the Spark job state. |
deadAt |
string |
time that at which "dead" livy state was first seen. |
jobCreationRequest | ||
killedAt |
string |
the time that at which "killed" livy state was first seen. |
notStartedAt |
string |
the time that at which "not_started" livy state was first seen. |
recoveringAt |
string |
the time that at which "recovering" livy state was first seen. |
runningAt |
string |
the time that at which "running" livy state was first seen. |
startingAt |
string |
the time that at which "starting" livy state was first seen. |
successAt |
string |
the time that at which "success" livy state was first seen. |
SparkErrorSource
Name | Type | Description |
---|---|---|
Dependency |
string |
|
System |
string |
|
Unknown |
string |
|
User |
string |
SparkJobType
The job type.
Name | Type | Description |
---|---|---|
SparkBatch |
string |
|
SparkSession |
string |
SparkRequest
Name | Type | Description |
---|---|---|
archives |
string[] |
|
args |
string[] |
|
className |
string |
|
conf |
object |
|
driverCores |
integer |
|
driverMemory |
string |
|
executorCores |
integer |
|
executorMemory |
string |
|
file |
string |
|
files |
string[] |
|
jars |
string[] |
|
name |
string |
|
numExecutors |
integer |
|
pyFiles |
string[] |
SparkScheduler
Name | Type | Description |
---|---|---|
cancellationRequestedAt |
string |
|
currentState | ||
endedAt |
string |
|
scheduledAt |
string |
|
submittedAt |
string |
SparkServiceError
Name | Type | Description |
---|---|---|
errorCode |
string |
|
message |
string |
|
source |
SparkServicePlugin
Name | Type | Description |
---|---|---|
cleanupStartedAt |
string |
|
currentState | ||
monitoringStartedAt |
string |
|
preparationStartedAt |
string |
|
resourceAcquisitionStartedAt |
string |
|
submissionStartedAt |
string |