Submits a Spark job.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | SubmitSparkJob |
The operation that you want to perform. Set the value to SubmitSparkJob. |
ConfigJson | String | Yes | { "name": "SparkPi", "file": "local:///tmp/spark-examples.jar", "className": "org.apache.spark.examples.SparkPi", "args": [ "100" ], "conf": { "spark.driver.resourceSpec": "medium", "spark.executor.instances": 5, "spark.executor.resourceSpec": "medium" } } |
The JSON string that defines the Spark job. |
VcName | String | Yes | MyCluster |
The name of the virtual cluster (VC) on which the job is executed. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
JobId | String | j202011032013hangzhouf742a4330003679 |
The ID of the Spark job. |
RequestId | String | C039FD4D-2F3C-4556-AF09-864D3A6485B2 |
The unique ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=SubmitSparkJob
&ConfigJson={ "name": "SparkPi", "file": "local:///tmp/spark-examples.jar", "className": "org.apache.spark.examples.SparkPi", "args": [ "100" ], "conf": { "spark.driver.resourceSpec": "medium", "spark.executor.instances": 5, "spark.executor.resourceSpec": "medium" } }
&VcName=MyCluster
&<Common request parameters>
Sample success responses
XML
format
<RequestId>C039FD4D-2F3C-4556-AF09-864D3A6485B2</RequestId>
<JobId>j202011032013hangzhouf742a4330003679</JobId>
JSON
format
{
"RequestId": "C039FD4D-2F3C-4556-AF09-864D3A6485B2",
"JobId": "j202011032013hangzhouf742a4330003679"
}
Error codes
For a list of error codes, visit the API Error Center.