Modifying a Job
Function
This API is used to modify a job.
URI
- URI format
PUT /v1.1/{project_id}/clusters/{cluster_id}/cdm/job/{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
- Parameter description of a message body
The message body parameters for modifying a job are the same as those for creating a job. For details, see Description of the jobs parameter in Creating a Job in a Specified Cluster.
Request
Sample request
PUT /v1.1/1551c7f6c808414d8e9f3c514a170f2e/cluster/6ec9a0a4-76be-4262-8697-e7af1fac7920/cdm/job/mysql2hive
{
"jobs": [{
"name": "mysql2hive",
"from-link-name": "mysqllink",
"from-connector-name": "generic-jdbc-connector",
"to-link-name": "hivelink",
"to-connector-name": "hive-connector",
"from-config-values": {
"configs": [
{
"inputs": [
{
"name": "fromJobConfig.useSql",
"value": "false"
},
{
"name": "fromJobConfig.schemaName",
"value": "rf_database"
},
{
"name": "fromJobConfig.tableName",
"value": "rf_from"
},
{
"name": "fromJobConfig.columnList",
"value": "AA&BB"
},
{
"name": "fromJobConfig.incrMigration",
"value": "false"
},
{
"name": "fromJobConfig.createOutTable",
"value": "false"
}
],
"name": "fromJobConfig"
}
]
},
"to-config-values": {
"configs": [
{
"inputs": [
{
"name": "toJobConfig.hive",
"value": "hive"
},
{
"name": "toJobConfig.database",
"value": "rf_database"
},
{
"name": "toJobConfig.table",
"value": "rf_to"
},
{
"name": "toJobConfig.tablePreparation",
"value": "DO_NOTHING"
},
{
"name": "toJobConfig.columnList",
"value": "aa&bb&cc&dd"
},
{
"name": "toJobConfig.shouldClearTable",
"value": "true"
}
],
"name": "toJobConfig"
}
]
},
"driver-config-values": {
"configs": [
{
"inputs": [
{
"name": "throttlingConfig.numExtractors",
"value": "1"
},
{
"name": "throttlingConfig.numLoaders",
"value": "1"
},
{
"name": "throttlingConfig.recordDirtyData",
"value": "false"
}
],
"name": "throttlingConfig"
},
{
"inputs": [],
"name": "jarConfig"
},
{
"inputs": [
{
"name": "schedulerConfig.isSchedulerJob",
"value": "false"
},
{
"name": "schedulerConfig.disposableType",
"value": "NONE"
}
],
"name": "schedulerConfig"
},
{
"inputs": [],
"name": "transformConfig"
},
{
"inputs": [
{
"name": "retryJobConfig.retryJobType",
"value": "NONE"
}
],
"name": "retryJobConfig"
}
]
}
}]
}
Response
- Sample response
{ "validation-result": [{},{},{}] } - Parameter Description
Parameter
Mandatory
Type
Description
validation-result
Yes
List
Validation result
- If a job fails to be modified, the failure cause is returned.
- If a job is successfully modified, a blank list is returned.
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 a Job
Next Article: Starting a Job
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.