Queries the list of jobs in a cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListJobs |
The operation that you want to perform. Set the value to ListJobs. |
ClusterId | String | Yes | ehpc-hz-FYUr32**** |
The ID of the cluster. You can call the ListClusters operation to query the cluster ID. |
Owner | String | No | user1 |
The name of the user that runs the job. You can call the ListUsers operation to query the users in the cluster. |
State | String | No | FINISHED |
The status of the job. Valid values:
|
Rerunable | String | No | false |
Indicates whether the job can be rerun. Valid values:
Default value: false |
PageNumber | Integer | No | 1 |
The number of the page to return. Page numbers start from 1. Default value: 1 |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Maximum value: 50 Default value: 10 |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Jobs | Array of JobInfo |
The list of job information. |
|
JobInfo | |||
ArrayRequest | String | 1-10:2 |
The job array. If the job is not in a queue, the output is empty. Format: X-Y:Z. X is the minimum index value. Y is the maximum index value. Z is the step size. For example, 2-7:2 indicates that three jobs need to be run and their index values are 2, 4, and 6. |
Comment | String | jobDescription |
The description of the job. |
Id | String | 0.manager |
The ID of the job. |
LastModifyTime | String | 2018-07-18T17:46:48 |
The time when the job was last modified. |
Name | String | job1 |
The name of the job. |
NodeList | String | ['compute2', 'compute3'] |
The list of compute nodes that were used to run the job. |
Owner | String | user1 |
The name of the user that ran the job. |
Priority | String | 0 |
The priority of the job. Valid values: 0 to 9. A large value indicates a high priority. |
Resources | Struct |
The resources that were used to run the job. |
|
Cores | Integer | 2 |
The number of CPUs that were used to run the job. |
Nodes | Integer | 0 |
The number of nodes that were used to run the job. |
ShellPath | String | ./Temp |
The path that was used to run the job. |
StartTime | String | 2018-07-18T17:46:48 |
The time when the job started to run. |
State | String | FINISHED |
The status of the job. Valid values:
|
Stderr | String | ./Temp |
The output file path of stderr. |
Stdout | String | ./Temp |
The output file path of stdout. |
SubmitTime | String | 2018-07-18T17:46:47 |
The time when the job was submitted. |
PageNumber | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | 04F0F334-1335-436C-A1D7-6C044FE7**** |
The ID of the request. |
TotalCount | Integer | 1 |
The number of returned entries. |
Examples
Sample requests
https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListJobs
&ClusterId=ehpc-hz-FYUr32****
&<Common request parameters>
Sample success responses
XML
format
<ListJobsResponse>
<TotalCount>1</TotalCount>
<PageSize>10</PageSize>
<RequestId>04F0F334-1335-436C-A1D7-6C044FE7****</RequestId>
<PageNumber>1</PageNumber>
<Jobs>
<JobInfo>
<Comment>jobDescription</Comment>
<Owner>user1</Owner>
<Priority>0</Priority>
<NodeList>['compute2', 'compute3']</NodeList>
<StartTime>2018-07-18T17:46:48</StartTime>
<LastModifyTime>2018-07-18T17:46:48</LastModifyTime>
<SubmitTime>2018-07-18T17:46:47</SubmitTime>
<Name>job1</Name>
<Stderr>./Temp</Stderr>
<State>FINISHED</State>
<ShellPath>./Temp</ShellPath>
<Id>0.manager</Id>
<ArrayRequest>1-10:2</ArrayRequest>
<Stdout>./Temp</Stdout>
<Resources>
<Cores>2</Cores>
<Nodes>0</Nodes>
</Resources>
</JobInfo>
</Jobs>
</ListJobsResponse>
JSON
format
{
"TotalCount": 1,
"PageSize": 10,
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE7****",
"PageNumber": 1,
"Jobs": {
"JobInfo": {
"Comment": "jobDescription",
"Owner": "user1",
"Priority": 0,
"NodeList": "['compute2', 'compute3']",
"StartTime": "2018-07-18T17:46:48",
"LastModifyTime": "2018-07-18T17:46:48",
"SubmitTime": "2018-07-18T17:46:47",
"Name": "job1",
"Stderr": "./Temp",
"State": "FINISHED",
"ShellPath": "./Temp",
"Id": "0.manager",
"ArrayRequest": "1-10:2",
"Stdout": "./Temp",
"Resources": {
"Cores": 2,
"Nodes": 0
}
}
}
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
406 | AgentError.Job.ListFailure | Failed to list jobs: %s | The error message returned because the following jobs have failed to be queried: {}. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The error message returned because the request has failed. The service is temporarily unavailable. |
For a list of error codes, visit the API Error Center.