Obtains the detailed information of a 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 GetJobDetail

The operation that you want to perform. Set the value to GetJobDetail.

JobId String Yes j202010271622hangzhouf742a4330000923

The ID of the Spark job.

VcName String Yes MyCluster

The name of the virtual cluster (VC) on which the job is run.

Response parameters

Parameter Type Example Description
JobDetail Struct

The detailed information of the Spark job.

CreateTime String 2020-10-27 16:23:16

The time when the Spark job starts to run. The time zone of the region in which the job was run is used.

CreateTimeValue String 1603786996000

The timestamp when the Spark job starts to run, in milliseconds.

Detail String {\"args\":[\"100\"],\"name\":\"SparkPi\",\"className\":\"org.apache.spark.examples.SparkPi\",\"conf\":{\"spark.driver.resourceSpec\":\"medium\",\"spark.executor.instances\":5,\"spark.executor.resourceSpec\":\"medium\"},\"file\":\"local:///tmp/spark-examples.jar\"}

The JSON string that defines the Spark job.

DriverResourceSpec String small

The model of the driver.

ExecutorInstances String 1

The model of the executor.

ExecutorResourceSpec String small

The number of executors that run in the Spark job.

JobId String j202010271622hangzhouf742a4330000923

The ID of the Spark job.

JobName String SparkPi

The name of the Spark job.

SparkUI String https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx

The UI for the Spark job. For more information about the related configurations, see Spark UI.

Status String success

The status code of the job.

SubmitTime String 2020-10-27 16:23:16

The time when the job was submitted. The time zone of the region in which the job was run is used.

SubmitTimeValue String 1603786996000

The timestamp when the job was submitted, in milliseconds.

UpdateTime String 2020-10-27 16:23:16

The time when the job status was last updated. The time zone of the region in which the job was run is used.

UpdateTimeValue String 1603786996000

The timestamp when the job was last updated, in milliseconds.

VcName String MyCluster

The name of the VC on which the job is run.

RequestId String 5F10AB6E-8984-4E32-B821-4E1512711B8C

The unique ID of the request.

The following table describes the job status code.

Status code

Description

starting

The job is starting and has not been run.

running

The job is being run.

error

The execution of a program in the job failed and an exception is returned.

dead

The job failed due to issues such as insufficient resources.

killed

The job is canceled during execution.

success

The job succeeds.

Examples

Sample requests

http(s)://[Endpoint]/? Action=GetJobDetail
&JobId=j202010271622hangzhouf742a4330000923
&VcName=MyCluster
&<Common request parameters>

Sample success responses

XML format

<JobDetail>
    <Status>success</Status>
    <VcName>release-test</VcName>
    <ExecutorInstances>5</ExecutorInstances>
    <SparkUI>https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx</SparkUI>
    <DriverResourceSpec>medium</DriverResourceSpec>
    <CreateTime>2020-10-27 16:23:16</CreateTime>
    <JobName>SparkPi</JobName>
    <ExecutorResourceSpec>medium</ExecutorResourceSpec>
    <SubmitTime>2020-10-27 16:22:52</SubmitTime>
    <CreateTimeValue>1603786996000</CreateTimeValue>
    <UpdateTimeValue>1603787047000</UpdateTimeValue>
    <SubmitTimeValue>1603786972000</SubmitTimeValue>
    <UpdateTime>2020-10-27 16:24:07</UpdateTime>
    <JobId>j202010271622hangzhouf742a4330000923</JobId>
    <Detail>{"args":["100"],"name":"SparkPi","className":"org.apache.spark.examples.SparkPi","conf":{"spark.driver.resourceSpec":"medium","spark.executor.instances":5,"spark.executor.resourceSpec":"medium"},"file":"local:///tmp/spark-examples.jar"}</Detail>
</JobDetail>
<RequestId>5F10AB6E-8984-4E32-B821-4E1512711B8C</RequestId>

JSON format

{
  "JobDetail": {
    "Status": "success",
    "VcName": "MyCluser",
    "ExecutorInstances": 5,
    "SparkUI": "https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx",
    "DriverResourceSpec": "medium",
    "CreateTime": "2020-10-27 16:23:16",
    "JobName": "SparkPi",
    "ExecutorResourceSpec": "medium",
    "SubmitTime": "2020-10-27 16:22:52",
    "CreateTimeValue": 1603786996000,
    "UpdateTimeValue": 1603787047000,
    "SubmitTimeValue": 1603786972000,
    "UpdateTime": "2020-10-27 16:24:07",
    "JobId": "j202010271622hangzhouf742a4330000923",
    "Detail": "{\"args\":[\"100\"],\"name\":\"SparkPi\",\"className\":\"org.apache.spark.examples.SparkPi\",\"conf\":{\"spark.driver.resourceSpec\":\"medium\",\"spark.executor.instances\":5,\"spark.executor.resourceSpec\":\"medium\"},\"file\":\"local:///tmp/spark-examples.jar\"}"
  },
  "RequestId": "5F10AB6E-8984-4E32-B821-4E1512711B8C"
}

Error codes

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