Dela via


Spark Session - Get Spark Sessions

Visa en lista över alla spark-sessioner som körs under en viss 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-parametrar

Name I Obligatorisk Typ Description
endpoint
path True

string

Slutpunkten för arbetsytans utveckling, till exempel https://myworkspace.dev.azuresynapse.net.

livyApiVersion
path True

string

Giltig API-version för begäran.

sparkPoolName
path True

string

Namnet på spark-poolen.

detailed
query

boolean

Valfri frågeparam som anger om ett detaljerat svar returneras bortom oformaterad livy.

from
query

integer (int32)

Valfri param som anger vilket index listan ska börja från.

size
query

integer (int32)

Valfri param som anger storleken på den returnerade listan.

        By default it is 20 and that is the maximum.

Svar

Name Typ Description
200 OK

SparkSessionCollection

Framgång

Exempel

List all spark session jobs

Exempelbegäran

GET myWorkspace.dev.azuresynapse.net/livyApi/versions/2020-12-01/sparkPools/mySparkPool/sessions?from=0&size=2&detailed=True

Exempelsvar

{
  "from": 0,
  "total": 2,
  "sessions": []
}

Definitioner

Name Description
LivyStates

Batchtillståndet

PluginCurrentState
SchedulerCurrentState
SparkErrorSource
SparkJobType

Jobbtypen.

SparkRequest
SparkScheduler
SparkServiceError
SparkServicePlugin
SparkSession
SparkSessionCollection
SparkSessionResultType
SparkSessionState

LivyStates

Batchtillståndet

Värde Description
busy
dead
error
idle
killed
not_started
recovering
running
shutting_down
starting
success

PluginCurrentState

Värde Description
Cleanup
Ended
Monitoring
Preparation
Queued
ResourceAcquisition
Submission

SchedulerCurrentState

Värde Description
Ended
Queued
Scheduled

SparkErrorSource

Värde Description
Dependency
System
Unknown
User

SparkJobType

Jobbtypen.

Värde Description
SparkBatch
SparkSession

SparkRequest

Name Typ 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 Typ Description
cancellationRequestedAt

string (date-time)

currentState

SchedulerCurrentState

endedAt

string (date-time)

scheduledAt

string (date-time)

submittedAt

string (date-time)

SparkServiceError

Name Typ Description
errorCode

string

message

string

source

SparkErrorSource

SparkServicePlugin

Name Typ Description
cleanupStartedAt

string (date-time)

currentState

PluginCurrentState

monitoringStartedAt

string (date-time)

preparationStartedAt

string (date-time)

resourceAcquisitionStartedAt

string (date-time)

submissionStartedAt

string (date-time)

SparkSession

Name Typ Description
appId

string

appInfo

object

artifactId

string

errorInfo

SparkServiceError[]

id

integer (int32)

jobType

SparkJobType

livyInfo

SparkSessionState

log

string[]

name

string

pluginInfo

SparkServicePlugin

result

SparkSessionResultType

schedulerInfo

SparkScheduler

sparkPoolName

string

state

LivyStates

Sessionstillståndet.

submitterId

string

submitterName

string

tags

object

workspaceName

string

SparkSessionCollection

Name Typ Description
from

integer (int32)

sessions

SparkSession[]

total

integer (int32)

SparkSessionResultType

Värde Description
Cancelled
Failed
Succeeded
Uncertain

SparkSessionState

Name Typ Description
busyAt

string (date-time)

currentState

string

deadAt

string (date-time)

errorAt

string (date-time)

idleAt

string (date-time)

jobCreationRequest

SparkRequest

killedAt

string (date-time)

notStartedAt

string (date-time)

recoveringAt

string (date-time)

shuttingDownAt

string (date-time)

startingAt

string (date-time)