Obtains the status of an interactive Spark job.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetSparkSessionState

The operation that you want to perform. Set this parameter to GetSparkSessionState.

Response parameters

Parameter Type Example Description
RequestId String 341ADFA1-4A68-4707-9CA7-FA86523A5F14

The unique ID of the request.

State String idle

The status of the current Spark Session. Valid values:

  • starting: The current Spark session is being started.
  • idle: The current Spark session is idle.
  • busy: The current Spark session is executing a code block.
  • shutting_down: The current Spark session is being terminated.
  • error: An error occurs in the current session. DLA starts to clear this session.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetSparkSessionState
&JobId=j202104171040zjkb4cc449d0000000
&<Common request parameters>

Sample success responses

XML format

<RequestId>341ADFA1-4A68-4707-9CA7-FA86523A5F14</RequestId>
<State>idle</State>

JSON format

{
  "RequestId": "341ADFA1-4A68-4707-9CA7-FA86523A5F14",
  "State": "idle"
}

Error codes

For a list of error codes, visit the API Error Center.