Spark Session - Get Spark Sessions
List all spark sessions which are running under a particular spark pool.
GET {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions
GET {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions?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 session jobs
Sample request
GET myWorkspace.dev.azuresynapse.net/livyApi/versions/2020-12-01/sparkPools/mySparkPool/sessions?from=0&size=2&detailed=True
Sample response
{
"from": 0,
"total": 2,
"sessions": []
}
Definitions
Name | Description |
---|---|
Livy |
The batch state |
Plugin |
|
Scheduler |
|
Spark |
|
Spark |
The job type. |
Spark |
|
Spark |
|
Spark |
|
Spark |
|
Spark |
|
Spark |
|
Spark |
|
Spark |
LivyStates
The batch state
Value | Description |
---|---|
busy | |
dead | |
error | |
idle | |
killed | |
not_started | |
recovering | |
running | |
shutting_down | |
starting | |
success |
PluginCurrentState
Value | Description |
---|---|
Cleanup | |
Ended | |
Monitoring | |
Preparation | |
Queued | |
ResourceAcquisition | |
Submission |
SchedulerCurrentState
Value | Description |
---|---|
Ended | |
Queued | |
Scheduled |
SparkErrorSource
Value | Description |
---|---|
Dependency | |
System | |
Unknown | |
User |
SparkJobType
The job type.
Value | Description |
---|---|
SparkBatch | |
SparkSession |
SparkRequest
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
cancellationRequestedAt |
string (date-time) |
|
currentState | ||
endedAt |
string (date-time) |
|
scheduledAt |
string (date-time) |
|
submittedAt |
string (date-time) |
SparkServiceError
Name | Type | Description |
---|---|---|
errorCode |
string |
|
message |
string |
|
source |
SparkServicePlugin
Name | Type | Description |
---|---|---|
cleanupStartedAt |
string (date-time) |
|
currentState | ||
monitoringStartedAt |
string (date-time) |
|
preparationStartedAt |
string (date-time) |
|
resourceAcquisitionStartedAt |
string (date-time) |
|
submissionStartedAt |
string (date-time) |
SparkSession
Name | Type | Description |
---|---|---|
appId |
string |
|
appInfo |
object |
|
artifactId |
string |
|
errorInfo | ||
id |
integer (int32) |
|
jobType | ||
livyInfo | ||
log |
string[] |
|
name |
string |
|
pluginInfo | ||
result | ||
schedulerInfo | ||
sparkPoolName |
string |
|
state |
The session state. |
|
submitterId |
string |
|
submitterName |
string |
|
tags |
object |
|
workspaceName |
string |
SparkSessionCollection
Name | Type | Description |
---|---|---|
from |
integer (int32) |
|
sessions | ||
total |
integer (int32) |
SparkSessionResultType
Value | Description |
---|---|
Cancelled | |
Failed | |
Succeeded | |
Uncertain |
SparkSessionState
Name | Type | Description |
---|---|---|
busyAt |
string (date-time) |
|
currentState |
string |
|
deadAt |
string (date-time) |
|
errorAt |
string (date-time) |
|
idleAt |
string (date-time) |
|
jobCreationRequest | ||
killedAt |
string (date-time) |
|
notStartedAt |
string (date-time) |
|
recoveringAt |
string (date-time) |
|
shuttingDownAt |
string (date-time) |
|
startingAt |
string (date-time) |