Spark Session - Create Spark Session

Yeni Spark oturumu oluşturun.

POST {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions
POST {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions?detailed={detailed}

URI Parametreleri

Name İçinde Gerekli Tür Description
endpoint
path True

string

Çalışma alanı geliştirme uç noktası, örneğin https://myworkspace.dev.azuresynapse.net.

livyApiVersion
path True

string

İstek için geçerli api sürümü.

sparkPoolName
path True

string

Spark havuzunun adı.

detailed
query

boolean

Ayrıntılı yanıtın düz livy'nin ötesinde döndürülip döndürülmeyeceğini belirten isteğe bağlı sorgu parametresi.

İstek Gövdesi

Name Gerekli Tür Description
name True

string

archives

string[]

args

string[]

artifactId

string

className

string

conf

object

driverCores

integer (int32)

driverMemory

string

executorCores

integer (int32)

executorMemory

string

file

string

files

string[]

jars

string[]

numExecutors

integer (int32)

pyFiles

string[]

tags

object

Yanıtlar

Name Tür Description
200 OK

SparkSession

Başarı

Örnekler

Create new spark session.

Örnek isteği

POST myWorkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/mySparkPool/sessions?detailed=True

{
  "tags": null,
  "artifactId": "fill in here",
  "name": "jobname",
  "file": "abfss://",
  "className": "classname",
  "args": [],
  "jars": [],
  "files": [],
  "archives": [],
  "conf": null,
  "driverMemory": "4g",
  "driverCores": 4,
  "executorMemory": "2g",
  "executorCores": 2,
  "numExecutors": 2
}

Örnek yanıt

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

Tanımlar

Name Description
LivyStates

Toplu iş durumu

PluginCurrentState
SchedulerCurrentState
SparkErrorSource
SparkJobType

İş türü.

SparkRequest
SparkScheduler
SparkServiceError
SparkServicePlugin
SparkSession
SparkSessionOptions
SparkSessionResultType
SparkSessionState

LivyStates

Toplu iş durumu

Değer Description
not_started
starting
idle
busy
shutting_down
error
dead
killed
success
running
recovering

PluginCurrentState

Değer Description
Preparation
ResourceAcquisition
Queued
Submission
Monitoring
Cleanup
Ended

SchedulerCurrentState

Değer Description
Queued
Scheduled
Ended

SparkErrorSource

Değer Description
System
User
Unknown
Dependency

SparkJobType

İş türü.

Değer Description
SparkBatch
SparkSession

SparkRequest

Name Tür 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 Tür Description
cancellationRequestedAt

string (date-time)

currentState

SchedulerCurrentState

endedAt

string (date-time)

scheduledAt

string (date-time)

submittedAt

string (date-time)

SparkServiceError

Name Tür Description
errorCode

string

message

string

source

SparkErrorSource

SparkServicePlugin

Name Tür 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 Tür 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

Oturum durumu.

submitterId

string

submitterName

string

tags

object

workspaceName

string

SparkSessionOptions

Name Tür Description
archives

string[]

args

string[]

artifactId

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[]

tags

object

SparkSessionResultType

Değer Description
Uncertain
Succeeded
Failed
Cancelled

SparkSessionState

Name Tür 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)