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

Request

Sample 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

    200

  • 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.