次の方法で共有


Spark Session - Create Spark Session

新しい Spark セッションを作成します。

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

URI パラメーター

名前 / 必須 説明
endpoint
path True

string

ワークスペース開発エンドポイント (https://myworkspace.dev.azuresynapse.netなど)。

livyApiVersion
path True

string

要求の有効な API バージョン。

sparkPoolName
path True

string

Spark プールの名前。

detailed
query

boolean

プレーン livy を超えて詳細な応答が返されるかどうかを指定する省略可能なクエリ パラメーター。

要求本文

名前 必須 説明
name True

string

archives

string[]

args

string[]

artifactId

string

className

string

conf

object

driverCores

integer (int32)

driverMemory

string

executorCores

integer (int32)

executorMemory

string

file

string

files

string[]

jars

string[]

numExecutors

integer (int32)

pyFiles

string[]

tags

object

応答

名前 説明
200 OK

SparkSession

成功

Create new spark session.

要求のサンプル

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
}

応答のサンプル

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

定義

名前 説明
LivyStates

バッチ状態

PluginCurrentState
SchedulerCurrentState
SparkErrorSource
SparkJobType

ジョブの種類。

SparkRequest
SparkScheduler
SparkServiceError
SparkServicePlugin
SparkSession
SparkSessionOptions
SparkSessionResultType
SparkSessionState

LivyStates

バッチ状態

説明
not_started
starting
idle
busy
shutting_down
error
dead
killed
success
running
recovering

PluginCurrentState

説明
Preparation
ResourceAcquisition
Queued
Submission
Monitoring
Cleanup
Ended

SchedulerCurrentState

説明
Queued
Scheduled
Ended

SparkErrorSource

説明
System
User
Unknown
Dependency

SparkJobType

ジョブの種類。

説明
SparkBatch
SparkSession

SparkRequest

名前 説明
archives

string[]

args

string[]

className

string

conf

object

driverCores

integer (int32)

driverMemory

string

executorCores

integer (int32)

executorMemory

string

file

string

files

string[]

jars

string[]

name

string

numExecutors

integer (int32)

pyFiles

string[]

SparkScheduler

名前 説明
cancellationRequestedAt

string (date-time)

currentState

SchedulerCurrentState

endedAt

string (date-time)

scheduledAt

string (date-time)

submittedAt

string (date-time)

SparkServiceError

名前 説明
errorCode

string

message

string

source

SparkErrorSource

SparkServicePlugin

名前 説明
cleanupStartedAt

string (date-time)

currentState

PluginCurrentState

monitoringStartedAt

string (date-time)

preparationStartedAt

string (date-time)

resourceAcquisitionStartedAt

string (date-time)

submissionStartedAt

string (date-time)

SparkSession

名前 説明
appId

string

appInfo

object

artifactId

string

errorInfo

SparkServiceError[]

id

integer (int32)

jobType

SparkJobType

livyInfo

SparkSessionState

log

string[]

name

string

pluginInfo

SparkServicePlugin

result

SparkSessionResultType

schedulerInfo

SparkScheduler

sparkPoolName

string

state

LivyStates

セッションの状態。

submitterId

string

submitterName

string

tags

object

workspaceName

string

SparkSessionOptions

名前 説明
archives

string[]

args

string[]

artifactId

string

className

string

conf

object

driverCores

integer (int32)

driverMemory

string

executorCores

integer (int32)

executorMemory

string

file

string

files

string[]

jars

string[]

name

string

numExecutors

integer (int32)

pyFiles

string[]

tags

object

SparkSessionResultType

説明
Uncertain
Succeeded
Failed
Cancelled

SparkSessionState

名前 説明
busyAt

string (date-time)

currentState

string

deadAt

string (date-time)

errorAt

string (date-time)

idleAt

string (date-time)

jobCreationRequest

SparkRequest

killedAt

string (date-time)

notStartedAt

string (date-time)

recoveringAt

string (date-time)

shuttingDownAt

string (date-time)

startingAt

string (date-time)