Spark Batch - Create Spark Batch Job
Maak een nieuwe Spark-batchtaak.
POST {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches
POST {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches?detailed={detailed}
URI-parameters
Name | In | Vereist | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Het eindpunt voor de ontwikkeling van de werkruimte, bijvoorbeeld |
livy
|
path | True |
string |
Geldige API-versie voor de aanvraag. |
spark
|
path | True |
string |
Naam van de Spark-pool. |
detailed
|
query |
boolean |
Optionele queryparameter die aangeeft of een gedetailleerd antwoord wordt geretourneerd buiten gewone livy. |
Aanvraagbody
Name | Vereist | Type | Description |
---|---|---|---|
file | True |
string |
|
name | True |
string |
|
archives |
string[] |
||
args |
string[] |
||
artifactId |
string |
||
className |
string |
||
conf |
object |
||
driverCores |
integer |
||
driverMemory |
string |
||
executorCores |
integer |
||
executorMemory |
string |
||
files |
string[] |
||
jars |
string[] |
||
numExecutors |
integer |
||
pyFiles |
string[] |
||
tags |
object |
Antwoorden
Name | Type | Description |
---|---|---|
200 OK |
Geslaagd |
Voorbeelden
Create new spark batch job.
Voorbeeldaanvraag
POST myWorkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/mySparkPool/batches?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": 4,
"numExecutors": 2
}
Voorbeeldrespons
{
"livyInfo": null,
"name": "jobname",
"workspaceName": "myWorkspace",
"sparkPoolName": "mySparkPool",
"submitterName": "thetime",
"submitterId": "thesubmitterid",
"artifactId": "fill in here",
"jobType": "SparkBatch",
"result": "Failed",
"schedulerInfo": null,
"pluginInfo": null,
"errorInfo": [],
"tags": null,
"id": 1,
"appId": "fill in here",
"appInfo": null,
"state": "the state",
"log": []
}
Definities
Name | Description |
---|---|
Livy |
De batchstatus |
Plugin |
|
Scheduler |
|
Spark |
|
Spark |
|
Spark |
Het resultaat van de Spark-batchtaak. |
Spark |
|
Spark |
|
Spark |
Het taaktype. |
Spark |
|
Spark |
|
Spark |
|
Spark |
LivyStates
De batchstatus
Name | Type | 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 | Type | Description |
---|---|---|
Cleanup |
string |
|
Ended |
string |
|
Monitoring |
string |
|
Preparation |
string |
|
Queued |
string |
|
ResourceAcquisition |
string |
|
Submission |
string |
SchedulerCurrentState
Name | Type | Description |
---|---|---|
Ended |
string |
|
Queued |
string |
|
Scheduled |
string |
SparkBatchJob
Name | Type | Description |
---|---|---|
appId |
string |
De toepassings-id van deze sessie |
appInfo |
object |
De gedetailleerde toepassingsgegevens. |
artifactId |
string |
De artefact-id. |
errorInfo |
De foutinformatie. |
|
id |
integer |
De sessie-id. |
jobType |
Het taaktype. |
|
livyInfo | ||
log |
string[] |
De logboeklijnen. |
name |
string |
De batchnaam. |
pluginInfo |
De informatie over de invoegtoepassing. |
|
result |
Het resultaat van de Spark-batchtaak. |
|
schedulerInfo |
De scheduler-informatie. |
|
sparkPoolName |
string |
De naam van de Spark-pool. |
state |
De batchstatus |
|
submitterId |
string |
De inzender-id. |
submitterName |
string |
De naam van de inzender. |
tags |
object |
De tags. |
workspaceName |
string |
De naam van de werkruimte. |
SparkBatchJobOptions
Name | Type | 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 |
SparkBatchJobResultType
Het resultaat van de Spark-batchtaak.
Name | Type | Description |
---|---|---|
Cancelled |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Uncertain |
string |
SparkBatchJobState
Name | Type | Description |
---|---|---|
currentState |
string |
de status van de Spark-taak. |
deadAt |
string |
tijd waarop de "dode" livy-toestand voor het eerst werd gezien. |
jobCreationRequest | ||
killedAt |
string |
het tijdstip waarop de "vermoorde" Livy-staat voor het eerst werd gezien. |
notStartedAt |
string |
het tijdstip waarop "not_started" livy voor het eerst werd gezien. |
recoveringAt |
string |
het tijdstip waarop het 'herstellen' van de livy-toestand voor het eerst werd gezien. |
runningAt |
string |
het tijdstip waarop de "actieve" livy-status voor het eerst werd gezien. |
startingAt |
string |
het tijdstip waarop de "beginnende" livy-status voor het eerst werd gezien. |
successAt |
string |
het tijdstip waarop de livy-status 'succes' voor het eerst werd gezien. |
SparkErrorSource
Name | Type | Description |
---|---|---|
Dependency |
string |
|
System |
string |
|
Unknown |
string |
|
User |
string |
SparkJobType
Het taaktype.
Name | Type | Description |
---|---|---|
SparkBatch |
string |
|
SparkSession |
string |
SparkRequest
Name | Type | 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 | Type | Description |
---|---|---|
cancellationRequestedAt |
string |
|
currentState | ||
endedAt |
string |
|
scheduledAt |
string |
|
submittedAt |
string |
SparkServiceError
Name | Type | Description |
---|---|---|
errorCode |
string |
|
message |
string |
|
source |
SparkServicePlugin
Name | Type | Description |
---|---|---|
cleanupStartedAt |
string |
|
currentState | ||
monitoringStartedAt |
string |
|
preparationStartedAt |
string |
|
resourceAcquisitionStartedAt |
string |
|
submissionStartedAt |
string |