Stopping a Job
Function
This API is used to stop a running job.
URI
- URI format
PUT /v1.1/{project_id}/clusters/{cluster_id}/cdm/job/{job_name}/stop
- 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
PUT /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters/6ec9a0a4-76be-4262-8697-e7af1fac7920/cdm/job/jdbc2hive/stop
Response
- Sample response
{ "submissions":[ { "isIncrementing":false, "job-name":"jobc2hive", "submission-id":4, "isStopingIncrement":"", "last-update-date":1588129508074, "is-execute-auto":false, "delete_rows":0, "write_rows":0, "last-udpate-user":"op_svc_cdm", "to-schema":{ "valueIdxDatatimeFormat":null, "compress":null, "created":1588129508254, "columns":[ ], "originalColumnNames":null, "store_type":null, "MapIdx2ValueIdx":{ }, "path":null, "fieldSeparator":null, "originalColumnTypes":null, "name":"obsto", "schema_type":"binary", "paramMap":{ "to.bucket":"cdm-test", "from.bucket":"cdm-patch-cn-north-7", "validateMD5":"true", "org.apache.sqoop.job.etl.output.directory":"test/", "toJobConfig.fileOpType":"REPLACE" } }, "isDeleteJob":false, "creation-user":"op_svc_cdm", "progress":0, "creation-date":1588129508045, "external-id":"job_local2037107723_0004", "external-link":"http://localhost:8080/", "from-schema":{ "valueIdxDatatimeFormat":null, "compress":null, "created":1588129508149, "columns":[ ], "originalColumnNames":null, "store_type":null, "MapIdx2ValueIdx":{ }, "path":null, "fieldSeparator":null, "originalColumnTypes":null, "name":"obsfrom", "schema_type":"binary", "paramMap":{ "total.file.size":"73893799", "store.file.dir":"/home/Ruby/filelist/TEST", "store.file.name":"/home/Ruby/filelist/TEST/TEST.txt.gz", "total.file.count":"1" } }, "update_rows":0, "status":"RUNNING", "execute-date":1588129508074 } ] } - Parameter description
Parameter
Mandatory
Type
Description
submissions
Yes
List
Job running information. For details, see Description of the submissions parameter.
- Description of the submissions parameter
Parameter
Mandatory
Type
Description
progress
Yes
Integer
Job progress. If a job fails, the value is -1. Otherwise, the value is 0 to 100.
job-name
Yes
String
Job name
status
Yes
String
Job status. The options are as follows:
- BOOTING: The job is starting.
- FAILURE_ON_SUBMIT: The job fails to be submitted.
- RUNNING: The job is running.
- SUCCEEDED: The job is executed successfully.
- FAILED: The job failed.
- UNKNOWN: The job status is unknown.
- NEVER_EXECUTED: The job has not been executed.
creation-date
Yes
Timestamp
Time when a job is created
creation-user
Yes
String
User who created a job
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: Starting a Job
Next Article: Querying Job Status
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.