云数据迁移 CDM-应用示例:查看作业结果

时间:2024-01-09 16:27:13

查看作业结果

  1. 调用查询作业状态API查询作业状态。
    curl -X GET -H 'Content-Type:application/json;charset=utf-8' -H "X-Cluster-ID:$ID" -H "X-Auth-Token:$Token" https://{cdm_endpoint}/v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters/6ec9a0a4-76be-4262-8697-e7af1fac7920/cdm/job/mysql2dws/status -k -v
  2. 查看作业执行结果,作业执行成功的响应如下:
    {
      "submissions": [{
        "progress": 0,
        "job-name": "mysql2dws",
        "status": "SUCCEEDED",
        "creation-date": 1536654788622,
        "creation-user": "cdm",
        "isStopingIncrement": "",
        "last-update-date": 1536654888622,
        "is-execute-auto": false,
        "last-udpate-user": "cdm",
        "isDeleteJob": false,
        "isIncrementing": false,
        "external-id": "job_local1127970451_0009",
        "counters": {
          "org.apache.sqoop.submission.counter.SqoopCounters": {
            "BYTES_WRITTEN": -1,
            "TOTAL_FILES": -1,
            "BYTES_READ": -1,
            "FILES_WRITTEN": -1,
            "TOTAL_SIZE": -1,
            "FILES_READ": -1,
            "ROWS_WRITTEN": 80,
            "ROWS_READ": 80
          }
        }
      }]
    }
    • BYTES_WRITTEN:表示写入的字节数。
    • BYTES_READ:表示读取的字节数。
    • TOTAL_FILES:表示总文件数。
    • FILES_WRITTEN:表示写入的文件数。
    • FILES_READ:表示读取的文件数。
    • ROWS_WRITTEN:表示写入成功的行数。
    • ROWS_READ:表示读取成功的行数。
support.huaweicloud.com/api-cdm/cdm_02_0011.html