Terminates the execution of a code block.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CancelSparkStatement |
The operation that you want to perform. Set the value to CancelSparkStatement. |
JobId | String | Yes | j202106071620hangzhou00000000001 |
The unique ID of the Spark job. |
StatementId | String | Yes | 1 |
The unique ID of the code block in the Spark job. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Data | String | true |
Indicates whether the code block is successfully executed. |
RequestId | String | 4BC96729-4670-4270-B08B-20C510C615E2 |
The unique ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CancelSparkStatement
&JobId=j202106071620hangzhou00000000001
&StatementId=1
&<Common request parameters>
Sample success responses
XML
format
<RequestId>4BC96729-4670-4270-B08B-20C510C615E2</RequestId>
<Data>2</Data>
JSON
format
{
"RequestId": "4BC96729-4670-4270-B08B-20C510C615E2",
"Data": 2
}
Error codes
For a list of error codes, visit the API Error Center.
This operation is asynchronous. If true
is returned, the Spark job receives the termination instruction and attempts to terminate
the code block. The termination result depends on the actual execution.
You can call the GetSparkStatement
operation to check whether the code block is terminated.