Querying Job Execution History
Function
This API is used to query the historical job execution status.
URI
- URI format
GET /v1.1/{project_id}/clusters/{cluster_id}/cdm/submissions?jname={job_name}
- Parameter description
Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID. For details about how to obtain the project ID, see Obtaining the Project ID, Account Name, and AK/SK.
cluster_id
Yes
String
Cluster ID. Obtain the value from the response for Creating a Cluster.
job_name
Yes
String
Job name
Request
GET /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters/6ec9a0a4-76be-4262-8697-e7af1fac7920/cdm/submissions?jname=jdbc2hive
Response
- Sample job running response
{ "submissions": [{ "progress": 1, "job-name": "jdbc2hive", "status": "BOOTING", "creation-date": 1536905778725, "creation-user": "cdm" }] } - Sample response of a successful job
{ "total": 4, "submissions": [{ "isIncrementing": false, "job-name": "TEST", "submission-id": 4, "counters": { "org.apache.sqoop.submission.counter.SqoopCounters": { "ROWS_WRITTEN_SKIPPED": 0, "TOTAL_FILES": 1, "BYTES_WRITTEN": 73893799, "ROWS_READ": -1, "ROWS_WRITTEN": -1, "BYTES_READ": 73893799, "FILES_WRITTEN": 1, "TOTAL_SIZE": 73893799, "FILES_READ": 1, "FILES_SKIPPED": -1 } }, "isStopingIncrement": "", "last-update-date": 1588129510930, "is-execute-auto": false, "delete_rows": 0, "write_rows": 0, "last-udpate-user": "op_svc_cdm", "isDeleteJob": false, "creation-user": "op_svc_cdm", "progress": 0.0, "creation-date": 1588129508045, "external-id": "job_local2037107723_0004", "update_rows": 0, "status": "SUCCEEDED", "execute-date": 1588129508074 }, { "isIncrementing": false, "job-name": "TEST", "submission-id": 3, "counters": { "org.apache.sqoop.submission.counter.SqoopCounters": { "ROWS_WRITTEN_SKIPPED": 0, "BYTES_WRITTEN": 73893799, "TOTAL_FILES": 1, "ROWS_READ": -1, "BYTES_READ": 73893799, "ROWS_WRITTEN": -1, "FILES_WRITTEN": 1, "FILES_READ": 1, "TOTAL_SIZE": 73893799, "FILES_SKIPPED": -1 } }, "isStopingIncrement": "", "last-update-date": 1588129279826, "is-execute-auto": false, "delete_rows": 0, "write_rows": 0, "last-udpate-user": "op_svc_cdm", "isDeleteJob": false, "creation-user": "op_svc_cdm", "progress": 0.0, "creation-date": 1588129278025, "external-id": "job_local542465800_0003", "update_rows": 0, "status": "SUCCEEDED", "execute-date": 1588129278035 }, { "isIncrementing": false, "job-name": "TEST", "submission-id": 2, "counters": { "org.apache.sqoop.submission.counter.SqoopCounters": { "ROWS_WRITTEN_SKIPPED": 0, "BYTES_WRITTEN": 73893799, "TOTAL_FILES": 1, "ROWS_READ": -1, "BYTES_READ": 73893799, "ROWS_WRITTEN": -1, "FILES_WRITTEN": 1, "FILES_READ": 1, "TOTAL_SIZE": 73893799, "FILES_SKIPPED": -1 } }, "isStopingIncrement": "", "last-update-date": 1588129267737, "is-execute-auto": false, "delete_rows": 0, "write_rows": 0, "last-udpate-user": "op_svc_cdm", "isDeleteJob": false, "creation-user": "op_svc_cdm", "progress": 0.0, "creation-date": 1588129266085, "external-id": "job_local180668607_0002", "update_rows": 0, "status": "SUCCEEDED", "execute-date": 1588129266120 }, { "isIncrementing": false, "job-name": "TEST", "submission-id": 1, "counters": { "org.apache.sqoop.submission.counter.SqoopCounters": { "ROWS_WRITTEN_SKIPPED": 0, "TOTAL_FILES": 1, "BYTES_WRITTEN": 73893799, "ROWS_READ": -1, "ROWS_WRITTEN": -1, "BYTES_READ": 73893799, "FILES_WRITTEN": 1, "TOTAL_SIZE": 73893799, "FILES_READ": 1, "FILES_SKIPPED": -1 } }, "isStopingIncrement": "", "last-update-date": 1588129207640, "is-execute-auto": false, "delete_rows": 0, "write_rows": 0, "last-udpate-user": "op_svc_cdm", "isDeleteJob": false, "creation-user": "op_svc_cdm", "progress": 0.0, "creation-date": 1588129202631, "external-id": "job_local1938744931_0001", "update_rows": 0, "status": "SUCCEEDED", "execute-date": 1588129202662 }], "page_no": 1, "page_size": 10 } - Parameter description
Parameter
Type
Description
submissions
List
Job running information. For details, see Description of the submissions parameter.
total
int
Total number of historical records for a job
page_no
int
Page number
page_size
int
Number of records on each page
Default value: 10
Return Value
- Normal
- Abnormal
Return Value
Description
400 Bad Request
Request error. For details about the returned error code, see Error Code.
401 Unauthorized
Authentication failed.
403 Forbidden
No operation permission.
404 Not Found
The requested resource is not found.
500 Internal Server Error
Internal service error.
503 Service Unavailable
Service unavailable.
Last Article: Querying Job Status
Next Article: Deleting a Job
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.