This API is used to list batch processing jobs in a queue of a project.
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Definition Project ID, which is used for resource isolation. For how to obtain a project ID, see Obtaining a Project ID. Example: 48cc2c48765f481480c7db940d6409d1 Constraints None Range The value can contain up to 64 characters. Only letters and digits are allowed. Default Value None |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
job_name |
No |
String |
Definition Name of a batch processing job. Constraints None Range None Default Value None |
job-id |
No |
String |
Definition Job ID used to query a batch job. Example: 03923a72-5ace-466a-a573-e8c7b08b8cf3 Constraints None Range None Default Value None |
cluster_name |
No |
String |
Definition DLI queue name. If this parameter is left blank, the names of all batch processing jobs in the current project are obtained. You are advised to specify this parameter, instead of leaving it blank. Constraints None Range None Default Value None |
queue_name |
No |
String |
Definition DLI queue name. You can query batch jobs based on the queue name. This method is recommended. Constraints None Range None Default Value None |
from |
No |
Integer |
Definition Index number of the start batch processing job. By default, the index number starts from 0. Constraints None Range None Default Value None |
size |
No |
Integer |
Definition Number of batch processing jobs to be queried Constraints None Range None Default Value None |
state |
No |
String |
Definition Job status by which batch jobs are queried Constraints None Range
Default Value None |
owner |
No |
String |
Definition User who submits a job. Constraints None Range None Default Value None |
None
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
from |
No |
Integer |
Definition Index number of the start batch processing job. Range None |
total |
No |
Integer |
Definition Total number of batch processing jobs. Range None |
sessions |
No |
Array of objects |
Definition Batch job information. For details, see Table 4. Range None |
create_time |
No |
Long |
Definition Time when a batch processing job is created. Range None |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
duration |
No |
Long |
Definition Job running duration (unit: millisecond) Range None |
id |
No |
String |
Definition ID of a batch processing job Range None |
state |
No |
String |
Definition Status of a batch processing job Range
|
appId |
No |
String |
Definition Backend application ID of a batch processing job Range None |
log |
No |
Array of Strings |
Definition Last 10 records of the current batch processing job Range None |
sc_type |
No |
String |
Definition Type of a computing resource. Currently, the value can be A, B, or C. If the computing resource type is customized, value CUSTOMIZED is returned. Range
|
cluster_name |
No |
String |
Definition Queue where a batch processing job is located. Range None |
create_time |
No |
Long |
Definition Time when a batch processing job is created. The timestamp is in milliseconds. Range None |
name |
No |
String |
Definition Name of a batch processing job. Range None |
owner |
No |
String |
Definition Owner of a batch processing job. Range None |
proxyUser |
No |
String |
Definition Proxy user (resource tenant) to which a batch processing job belongs. Range None |
kind |
No |
String |
Definition Type of a batch processing job. Only Spark parameters are supported. Range None |
queue |
No |
String |
Definition Queue where a batch processing job is located. Range None |
image |
No |
String |
Definition 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 custom Spark image for job running. Range None |
req_body |
No |
String |
Definition Request parameter details. Range None |
update_time |
No |
Long |
Definition Time when a batch processing job is updated. The timestamp is in milliseconds. Range None |
None
{
"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
}
]
}
Table 5 describes the status code.
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 Codes.