Modifying a Job

Function

This API is used to modify a job.

URI

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

    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.