Spark Session - Create Spark Session
Utwórz nową sesję platformy Spark.
POST {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions
POST {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions?detailed={detailed}
Parametry identyfikatora URI
Nazwa | W | Wymagane | Typ | Opis |
---|---|---|---|---|
endpoint
|
path | True |
string |
Punkt końcowy programowania obszaru roboczego, na przykład |
livy
|
path | True |
string |
Prawidłowa wersja interfejsu API dla żądania. |
spark
|
path | True |
string |
Nazwa puli platformy Spark. |
detailed
|
query |
boolean |
Opcjonalny parametr zapytania określający, czy szczegółowa odpowiedź jest zwracana poza zwykłą usługę livy. |
Treść żądania
Nazwa | Wymagane | Typ | Opis |
---|---|---|---|
name | True |
string |
|
archives |
string[] |
||
args |
string[] |
||
artifactId |
string |
||
className |
string |
||
conf |
object |
||
driverCores |
integer |
||
driverMemory |
string |
||
executorCores |
integer |
||
executorMemory |
string |
||
file |
string |
||
files |
string[] |
||
jars |
string[] |
||
numExecutors |
integer |
||
pyFiles |
string[] |
||
tags |
object |
Odpowiedzi
Nazwa | Typ | Opis |
---|---|---|
200 OK |
Powodzenie |
Przykłady
Create new spark session.
Przykładowe żądanie
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
}
Przykładowa odpowiedź
{
"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": []
}
Definicje
LivyStates
Stan partii
Nazwa | Typ | Opis |
---|---|---|
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
Nazwa | Typ | Opis |
---|---|---|
Cleanup |
string |
|
Ended |
string |
|
Monitoring |
string |
|
Preparation |
string |
|
Queued |
string |
|
ResourceAcquisition |
string |
|
Submission |
string |
SchedulerCurrentState
Nazwa | Typ | Opis |
---|---|---|
Ended |
string |
|
Queued |
string |
|
Scheduled |
string |
SparkErrorSource
Nazwa | Typ | Opis |
---|---|---|
Dependency |
string |
|
System |
string |
|
Unknown |
string |
|
User |
string |
SparkJobType
Typ zadania.
Nazwa | Typ | Opis |
---|---|---|
SparkBatch |
string |
|
SparkSession |
string |
SparkRequest
Nazwa | Typ | Opis |
---|---|---|
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
Nazwa | Typ | Opis |
---|---|---|
cancellationRequestedAt |
string |
|
currentState | ||
endedAt |
string |
|
scheduledAt |
string |
|
submittedAt |
string |
SparkServiceError
Nazwa | Typ | Opis |
---|---|---|
errorCode |
string |
|
message |
string |
|
source |
SparkServicePlugin
Nazwa | Typ | Opis |
---|---|---|
cleanupStartedAt |
string |
|
currentState | ||
monitoringStartedAt |
string |
|
preparationStartedAt |
string |
|
resourceAcquisitionStartedAt |
string |
|
submissionStartedAt |
string |
SparkSession
Nazwa | Typ | Opis |
---|---|---|
appId |
string |
|
appInfo |
object |
|
artifactId |
string |
|
errorInfo | ||
id |
integer |
|
jobType | ||
livyInfo | ||
log |
string[] |
|
name |
string |
|
pluginInfo | ||
result | ||
schedulerInfo | ||
sparkPoolName |
string |
|
state |
Stan sesji. |
|
submitterId |
string |
|
submitterName |
string |
|
tags |
object |
|
workspaceName |
string |
SparkSessionOptions
Nazwa | Typ | Opis |
---|---|---|
archives |
string[] |
|
args |
string[] |
|
artifactId |
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[] |
|
tags |
object |
SparkSessionResultType
Nazwa | Typ | Opis |
---|---|---|
Cancelled |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Uncertain |
string |
SparkSessionState
Nazwa | Typ | Opis |
---|---|---|
busyAt |
string |
|
currentState |
string |
|
deadAt |
string |
|
errorAt |
string |
|
idleAt |
string |
|
jobCreationRequest | ||
killedAt |
string |
|
notStartedAt |
string |
|
recoveringAt |
string |
|
shuttingDownAt |
string |
|
startingAt |
string |