Spark Session - Create Spark Session
Vytvořte novou relaci Sparku.
POST {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions
POST {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions?detailed={detailed}
Parametry identifikátoru URI
Name | V | Vyžadováno | Typ | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Vývojový koncový bod pracovního prostoru, například |
livy
|
path | True |
string |
Platná verze rozhraní API pro požadavek. |
spark
|
path | True |
string |
Název fondu sparků. |
detailed
|
query |
boolean |
Volitelný parametr dotazu určující, jestli se podrobná odpověď vrátí nad rámec prosté livy. |
Text požadavku
Name | Vyžadováno | Typ | Description |
---|---|---|---|
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 |
Odpovědi
Name | Typ | Description |
---|---|---|
200 OK |
Success |
Příklady
Create new spark session.
Ukázkový požadavek
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
}
Ukázková odpověď
{
"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": []
}
Definice
LivyStates
Stav dávky
Name | Typ | 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 | Typ | Description |
---|---|---|
Cleanup |
string |
|
Ended |
string |
|
Monitoring |
string |
|
Preparation |
string |
|
Queued |
string |
|
ResourceAcquisition |
string |
|
Submission |
string |
SchedulerCurrentState
Name | Typ | Description |
---|---|---|
Ended |
string |
|
Queued |
string |
|
Scheduled |
string |
SparkErrorSource
Name | Typ | Description |
---|---|---|
Dependency |
string |
|
System |
string |
|
Unknown |
string |
|
User |
string |
SparkJobType
Typ úlohy.
Name | Typ | Description |
---|---|---|
SparkBatch |
string |
|
SparkSession |
string |
SparkRequest
Name | Typ | 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 | Typ | Description |
---|---|---|
cancellationRequestedAt |
string |
|
currentState | ||
endedAt |
string |
|
scheduledAt |
string |
|
submittedAt |
string |
SparkServiceError
Name | Typ | Description |
---|---|---|
errorCode |
string |
|
message |
string |
|
source |
SparkServicePlugin
Name | Typ | Description |
---|---|---|
cleanupStartedAt |
string |
|
currentState | ||
monitoringStartedAt |
string |
|
preparationStartedAt |
string |
|
resourceAcquisitionStartedAt |
string |
|
submissionStartedAt |
string |
SparkSession
Name | Typ | Description |
---|---|---|
appId |
string |
|
appInfo |
object |
|
artifactId |
string |
|
errorInfo | ||
id |
integer |
|
jobType | ||
livyInfo | ||
log |
string[] |
|
name |
string |
|
pluginInfo | ||
result | ||
schedulerInfo | ||
sparkPoolName |
string |
|
state |
Stav relace. |
|
submitterId |
string |
|
submitterName |
string |
|
tags |
object |
|
workspaceName |
string |
SparkSessionOptions
Name | Typ | Description |
---|---|---|
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
Name | Typ | Description |
---|---|---|
Cancelled |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Uncertain |
string |
SparkSessionState
Name | Typ | Description |
---|---|---|
busyAt |
string |
|
currentState |
string |
|
deadAt |
string |
|
errorAt |
string |
|
idleAt |
string |
|
jobCreationRequest | ||
killedAt |
string |
|
notStartedAt |
string |
|
recoveringAt |
string |
|
shuttingDownAt |
string |
|
startingAt |
string |