Obtaining the List of Batch Processing Jobs

Function

This API is used to obtain the list of batch processing jobs in a queue of a project.

URI

Request

None

Response

Table 3 Response parameter description

Parameter

Mandatory

Type

Description

from

No

Integer

Index number of the start batch processing job.

total

No

Integer

Total number of batch processing jobs.

sessions

No

Array of objects

Batch job information. For details, see Table 6 in Creating a Batch Processing Job.

create_time

No

Long

Time when a batch processing job is created.

Table 4 sessions parameters

Parameter

Mandatory

Type

Description

duration

No

Long

Job running duration (unit: millisecond)

id

No

String

ID of a batch processing job.

state

No

String

Status of a batch processing job

appId

No

String

Back-end application ID of a batch processing job

log

No

Array of Strings

Last 10 records of the current batch processing job

sc_type

No

String

Type of a computing resource. If the computing resource type is customized, value CUSTOMIZED is returned.

cluster_name

No

String

Queue where a batch processing job is located.

create_time

No

Long

Time when a batch processing job is created. The timestamp is in milliseconds.

name

No

String

Name of a batch processing job.

owner

No

String

Owner of a batch processing job.

proxyUser

No

String

Proxy user (resource tenant) to which a batch processing job belongs.

kind

No

String

Type of a batch processing job. Only Spark parameters are supported.

queue

No

String

Queue where a batch processing job is located.

image

No

String

Custom image. The format is Organization name/Image name:Image version.

This parameter is valid only when feature is set to custom. You can use this parameter with the feature parameter to specify a user-defined Spark image for job running.

update_time

No

Long

Time when a batch processing job is updated. The timestamp is in milliseconds.

Example Request

None

Example Response

{
    "from": 0,
    "total": 1,
    "sessions": [
        {
            "id": "178fa687-2e8a-41ed-a439-b00de60bb176",
            "state": "dead",
            "appId": null,
            "log": [
             "stdout: ",
             "stderr: ",
             "YARN Diagnostics: "
           ],
           "sc_type": "A",
           "cluster_name": "test",
           "create_time": 1531906043036
        }
    ]
}

Status Codes

Table 5 describes the status code.

Table 5 Status codes

Status Code

Description

200

The query is successful.

400

Request error.

500

Internal service error.

Error Codes

If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Code.