Obtains information about all the job attempts related to a 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 ListSparkJobAttempt

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

JobId String Yes j202105272322hangzhou5d64f1560000128

The ID of the Spark job. You can view the ID on the Parameter Configuration page.

PageNumber Integer Yes 1

The number of the page to return, which is used to traverse all data. Pages start from page 1.

PageSize Integer Yes 10

The number of entries to return on each page.

VcName String Yes release-test

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

Condition Json No {"status":"success", "createTime":"2021-05-27 11:00:00", "timeZone":"Asia/Shanghai"}

The condition to filter job attempts. The value is in the JSON format.

Condition supports the following parameters:

  • status: Set this parameter to starting, running, unknown, success, dead, or killed.
  • createTime: The value of this parameter is in the format of yyyy-mm-dd HH:mm:ss. This parameter specifies the time at which jobs are submitted. If you specify this parameter, you must also specify the timeZone parameter.
  • timeZone: the time zone, such as Asia/Shanghai.

Response parameters

Parameter Type Example Description
DataResult Struct

The returned results.

JobAttemptList Array of Data

The list of job attempts.

CreateTime String 2021-05-27 23:22:08

The time when the job attempt was created.

CreateTimeValue String 1622128928000

The timestamp when the job attempt was created.

Detail String {"xxx":"xxx"}

The configurations of the job.

DurationTime String 00:01:12

The duration in which the job attempt was made.

DurationTimeValue String 72000

The timestamp when the job attempt was made.

JobAttemptId String j202105272322hangzhou5d64f1560000128-0001

The ID of the job attempt.

JobId String j202105272322hangzhou5d64f1560000128

The ID of the job.

JobName String xxx

The name of the job.

SparkUI String xxx

The address of Spark UI.

Status String success

The status of the job attempt.

TerminatedTime String 2021-05-27 23:23:20

The time when the job attempt was terminated.

TerminatedTimeValue String 1622129000000

The timestamp when the job attempt was terminated.

VcName String release-test

The name of the VC.

PageNumber String 1

The page number of the returned page.

PageSize String 10

The number of entries returned per page.

TotalCount String 1

The total number of job attempts.

RequestId String 4A839055-70C7-423D-A6F2-E714EA4502DB

The unique ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListSparkJobAttempt
&JobId=j202105272322hangzhou5d64f1560000128
&PageNumber=1
&PageSize=10
&VcName=release-test
&<Common request parameters>

Sample success responses

XML format

<DataResult>
    <TotalCount>1</TotalCount>
    <PageSize>10</PageSize>
    <PageNumber>1</PageNumber>
    <JobAttemptList>
        <VcName>release-test</VcName>
        <Status>success</Status>
        <JobAttemptId>j202105272322hangzhou5d64f1560000128-0001</JobAttemptId>
        <TerminatedTime>2021-05-27 23:23:20</TerminatedTime>
        <SparkUI>xxx</SparkUI>
        <DurationTimeValue>72000</DurationTimeValue>
        <CreateTime>2021-05-27 23:22:08</CreateTime>
        <JobName>xxx</JobName>
        <TerminatedTimeValue>1622129000000</TerminatedTimeValue>
        <JobId>j202105272322hangzhou5d64f1560000128</JobId>
        <Detail>{"xxx":"xxx"}</Detail>
        <CreateTimeValue>1622128928000</CreateTimeValue>
        <DurationTime>00:01:12</DurationTime>
    </JobAttemptList>
</DataResult>
<RequestId>4A839055-70C7-423D-A6F2-E714EA4502DB</RequestId>

JSON format

{"DataResult":{"TotalCount":"1","PageSize":"10","PageNumber":"1","JobAttemptList":[{"VcName":"release-test","Status":"success","JobAttemptId":"j202105272322hangzhou5d64f1560000128-0001","TerminatedTime":"2021-05-27 23:23:20","SparkUI":"xxx","DurationTimeValue":"72000","CreateTime":"2021-05-27 23:22:08","JobName":"xxx","TerminatedTimeValue":"1622129000000","JobId":"j202105272322hangzhou5d64f1560000128","Detail":"{\"xxx\":\"xxx\"}","CreateTimeValue":"1622128928000","DurationTime":"00:01:12"}]},"RequestId":"4A839055-70C7-423D-A6F2-E714EA4502DB"}

Error codes

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