Spark Session - Create Spark Session

Crie uma nova sessão spark.

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

Parâmetros do URI

Name Em Necessário Tipo Description
endpoint
path True

string

O ponto final de desenvolvimento da área de trabalho, por exemplo https://myworkspace.dev.azuresynapse.net.

livyApiVersion
path True

string

Versão de api válida para o pedido.

sparkPoolName
path True

string

Nome do conjunto spark.

detailed
query

boolean

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

Corpo do Pedido

Name Necessário Tipo 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

Respostas

Name Tipo Description
200 OK

SparkSession

Com êxito

Exemplos

Create new spark session.

Pedido de amostra

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
}

Resposta da amostra

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

Definições

Name Description
LivyStates

O estado do lote

PluginCurrentState
SchedulerCurrentState
SparkErrorSource
SparkJobType

O tipo de tarefa.

SparkRequest
SparkScheduler
SparkServiceError
SparkServicePlugin
SparkSession
SparkSessionOptions
SparkSessionResultType
SparkSessionState

LivyStates

O estado do lote

Name 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

Name Tipo Description
Cleanup

string

Ended

string

Monitoring

string

Preparation

string

Queued

string

ResourceAcquisition

string

Submission

string

SchedulerCurrentState

Name Tipo Description
Ended

string

Queued

string

Scheduled

string

SparkErrorSource

Name Tipo Description
Dependency

string

System

string

Unknown

string

User

string

SparkJobType

O tipo de tarefa.

Name Tipo Description
SparkBatch

string

SparkSession

string

SparkRequest

Name 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

Name Tipo Description
cancellationRequestedAt

string

currentState

SchedulerCurrentState

endedAt

string

scheduledAt

string

submittedAt

string

SparkServiceError

Name Tipo Description
errorCode

string

message

string

source

SparkErrorSource

SparkServicePlugin

Name Tipo Description
cleanupStartedAt

string

currentState

PluginCurrentState

monitoringStartedAt

string

preparationStartedAt

string

resourceAcquisitionStartedAt

string

submissionStartedAt

string

SparkSession

Name Tipo Description
appId

string

appInfo

object

artifactId

string

errorInfo

SparkServiceError[]

id

integer

jobType

SparkJobType

livyInfo

SparkSessionState

log

string[]

name

string

pluginInfo

SparkServicePlugin

result

SparkSessionResultType

schedulerInfo

SparkScheduler

sparkPoolName

string

state

LivyStates

O estado da sessão.

submitterId

string

submitterName

string

tags

object

workspaceName

string

SparkSessionOptions

Name 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

SparkSessionResultType

Name Tipo Description
Cancelled

string

Failed

string

Succeeded

string

Uncertain

string

SparkSessionState

Name Tipo Description
busyAt

string

currentState

string

deadAt

string

errorAt

string

idleAt

string

jobCreationRequest

SparkRequest

killedAt

string

notStartedAt

string

recoveringAt

string

shuttingDownAt

string

startingAt

string