Share via


Spark Batch - Get Spark Batch Jobs

Liste todos os trabalhos em lotes do Spark que estão em execução em um pool específico do Spark.

GET {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches
GET {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches?from={from}&size={size}&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.

from
query

integer

int32

Parâmetro opcional que especifica de qual índice a lista deve começar.

size
query

integer

int32

Parâmetro opcional que especifica o tamanho da lista retornada.

        By default it is 20 and that is the maximum.

Respostas

Nome Tipo Description
200 OK

SparkBatchJobCollection

Êxito

Exemplos

List all spark batch jobs

Sample Request

GET myWorkspace.dev.azuresynapse.net/livyApi/versions/2020-12-01/sparkPools/mySparkPool/batches?from=0&size=2&detailed=True

Sample Response

{
  "from": 0,
  "total": 2,
  "sessions": []
}

Definições

Nome Description
LivyStates

O estado do lote

PluginCurrentState
SchedulerCurrentState
SparkBatchJob
SparkBatchJobCollection

Resposta para a operação de lista em lotes.

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.

SparkBatchJobCollection

Resposta para a operação de lista em lotes.

Nome Tipo Description
from

integer

O índice inicial das sessões buscadas.

sessions

SparkBatchJob[]

Lista de lotes

total

integer

Número de sessões buscadas.

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