Share via


Spark Batch - Create Spark Batch Job

Crie um novo trabalho em lotes do Spark.

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

Parâmetros de URI

Nome Em Obrigatório Tipo Description
endpoint
path True

string

O ponto de extremidade de desenvolvimento do workspace, por exemplo https://myworkspace.dev.azuresynapse.net.

livyApiVersion
path True

string

Versão de API válida para a solicitação.

sparkPoolName
path True

string

Nome do pool do Spark.

detailed
query

boolean

Parâmetro de consulta opcional que especifica se a resposta detalhada é retornada além do livy simples.

Corpo da solicitação

Nome Obrigatório Tipo 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

Respostas

Nome Tipo Description
200 OK

SparkBatchJob

Êxito

Exemplos

Create new spark batch job.

Sample Request

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
}

Sample Response

{
  "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": []
}

Definições

Nome Description
LivyStates

O estado do lote

PluginCurrentState
SchedulerCurrentState
SparkBatchJob
SparkBatchJobOptions
SparkBatchJobResultType

O resultado do trabalho em lotes do Spark.

SparkBatchJobState
SparkErrorSource
SparkJobType

O tipo de trabalho.

SparkRequest
SparkScheduler
SparkServiceError
SparkServicePlugin

LivyStates

O estado do lote

Nome Tipo 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

Nome Tipo Description
Cleanup

string

Ended

string

Monitoring

string

Preparation

string

Queued

string

ResourceAcquisition

string

Submission

string

SchedulerCurrentState

Nome Tipo Description
Ended

string

Queued

string

Scheduled

string

SparkBatchJob

Nome Tipo Description
appId

string

A ID do aplicativo desta sessão

appInfo

object

As informações detalhadas do aplicativo.

artifactId

string

O identificador do artefato.

errorInfo

SparkServiceError[]

As informações de erro.

id

integer

A ID da sessão.

jobType

SparkJobType

O tipo de trabalho.

livyInfo

SparkBatchJobState

log

string[]

As linhas de log.

name

string

O nome do lote.

pluginInfo

SparkServicePlugin

As informações do plug-in.

result

SparkBatchJobResultType

O resultado do trabalho em lotes do Spark.

schedulerInfo

SparkScheduler

As informações do agendador.

sparkPoolName

string

O nome do pool do Spark.

state

LivyStates

O estado do lote

submitterId

string

O identificador do remetente.

submitterName

string

O nome do remetente.

tags

object

As marcas.

workspaceName

string

O nome do workspace.

SparkBatchJobOptions

Nome Tipo 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

O resultado do trabalho em lotes do Spark.

Nome Tipo Description
Cancelled

string

Failed

string

Succeeded

string

Uncertain

string

SparkBatchJobState

Nome Tipo Description
currentState

string

o estado do trabalho do Spark.

deadAt

string

tempo em que "morto" estado livy foi visto pela primeira vez.

jobCreationRequest

SparkRequest

killedAt

string

o tempo em que "matou" o estado livy foi visto pela primeira vez.

notStartedAt

string

o tempo em que "not_started" estado livy foi visto pela primeira vez.

recoveringAt

string

a hora em que "recuperando" o estado livy foi visto pela primeira vez.

runningAt

string

a hora em que o estado livy "em execução" foi visto pela primeira vez.

startingAt

string

a hora em que "iniciando" o estado livy foi visto pela primeira vez.

successAt

string

o tempo em que "sucesso" livy estado foi visto pela primeira vez.

SparkErrorSource

Nome Tipo Description
Dependency

string

System

string

Unknown

string

User

string

SparkJobType

O tipo de trabalho.

Nome Tipo Description
SparkBatch

string

SparkSession

string

SparkRequest

Nome Tipo 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

Nome Tipo Description
cancellationRequestedAt

string

currentState

SchedulerCurrentState

endedAt

string

scheduledAt

string

submittedAt

string

SparkServiceError

Nome Tipo Description
errorCode

string

message

string

source

SparkErrorSource

SparkServicePlugin

Nome Tipo Description
cleanupStartedAt

string

currentState

PluginCurrentState

monitoringStartedAt

string

preparationStartedAt

string

resourceAcquisitionStartedAt

string

submissionStartedAt

string