文档

ListJobs - 获取作业实例列表

更新时间:

获取到某个已部署作业下所有作业实例的信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求语法

GET /api/v2/namespaces/{namespace}/jobs

请求参数

名称类型必填描述示例值
workspacestring

工作空间ID。

a14bd5d90a****
namespacestring

项目空间名称。

default-namespace
pageIndexinteger

分页参数,页码索引,表示所请求页码,最小值为1,默认值为1。

1
pageSizeinteger

分页参数,表示所请求页码元素数量,最大值为100,最小值为1,默认值为10。

10
deploymentIdstring

已部署作业ID。

58718c99-3b29-4c5e-93bb-c9fc4ec6****

返回参数

名称类型描述示例值
object

响应数据。

requestIdstring

请求ID。

CBC799F0-AS7S-1D30-8A4F-882ED4DD****
successboolean

表示业务请求是否成功。

true
httpCodeinteger

固定值200。

200
errorCodestring
  • 当success为false,返回业务错误码;

  • 当success为true,返回空值。

""
errorMessagestring
  • 当success为false,返回业务错误信息;

  • 当success为true,返回空值。

""
pageIndexinteger

分页参数,页码索引,表示所请求页码。

1
pageSizeinteger

分页参数,表示所请求页码元素数量。

10
totalSizeinteger

满足查询条件的所有元素的数量。

1
dataarray
  • 当success为true,返回所有满足条件的实例信息;

  • 当success为false,返回空值。

Job

实例数据。

示例

正常返回示例

JSON格式

{
  "requestId": "CBC799F0-AS7S-1D30-8A4F-882ED4DD****",
  "success": true,
  "httpCode": 200,
  "errorCode": "\"\"",
  "errorMessage": "\"\"",
  "pageIndex": 1,
  "pageSize": 10,
  "totalSize": 1,
  "data": [
    {
      "jobId": "354dde66-a3ae-463e-967a-0b4107fd****",
      "deploymentId": "354dde66-a3ae-463e-967a-0b4107fd****",
      "deploymentName": "flinktest",
      "namespace": "namespacetest",
      "executionMode": "BATCH",
      "creator": "27846363877456****",
      "creatorName": "****@streamcompute.onaliyun.com",
      "modifier": "27846363877456****",
      "modifierName": "****@streamcompute.onaliyun.com",
      "startTime": 1660190835,
      "endTime": 1660277235,
      "engineVersion": "vvr-4.0.14-flink-1.13",
      "flinkConf": {
        "test": "test",
        "test2": 1
      },
      "status": {
        "currentJobStatus": "RUNNING",
        "failure": {
          "message": "Kubernetes deployment resource with name job-8b7db913-5b1f-4ac5-a332-8d50f342**** is not progressing.",
          "reason": "KubernetesDeploymentNotProgressing",
          "failedAt": 1660120062
        },
        "running": {
          "observedFlinkJobRestarts": 4,
          "observedFlinkJobStatus": "RUNNING"
        }
      },
      "metric": {
        "totalMemoryByte": 4096,
        "totalCpu": 2
      },
      "sessionClusterName": "null",
      "artifact": {
        "sqlArtifact": {
          "sqlScript": "CREATE TEMPORARY TABLE datagen_source(   name VARCHAR ) WITH (   'connector' = 'datagen' ); CREATE TEMPORARY TABLE blackhole_sink(   name  VARCHAR ) with (   'connector' = 'blackhole' ); INSERT INTO blackhole_sink SELECT name from datagen_source;",
          "additionalDependencies": [
            "https://oss/bucket/addition.jar"
          ]
        },
        "jarArtifact": {
          "jarUri": "https://oss/bucket/test.jar",
          "entryClass": "org.apapche.flink.test",
          "mainArgs": "start from main",
          "additionalDependencies": [
            "https://oss/bucket/addition.jar"
          ]
        },
        "pythonArtifact": {
          "pythonArtifactUri": "https://oss/bucket/test.py",
          "mainArgs": "start from main",
          "entryModule": "test.py",
          "additionalDependencies": [
            "https://oss/bucket/addition.py"
          ],
          "additionalPythonLibraries": [
            "https://oss/bucket/additionlib.py"
          ],
          "additionalPythonArchives": [
            "https://oss/bucket/additionArchives.zip"
          ]
        },
        "kind": "SQLSCRIPT"
      },
      "logging": {
        "loggingProfile": "oss",
        "log4j2ConfigurationTemplate": "xml格式文本",
        "log4jLoggers": [
          {
            "loggerName": "StdOutErrConsoleAppender",
            "loggerLevel": "ERROR"
          }
        ],
        "logReservePolicy": {
          "openHistory": true,
          "expirationDays": 7
        }
      },
      "batchResourceSetting": {
        "maxSlot": 10,
        "basicResourceSetting": {
          "parallelism": 4,
          "jobmanagerResourceSettingSpec": {
            "cpu": 2,
            "memory": "4 GiB"
          },
          "taskmanagerResourceSettingSpec": {
            "cpu": 2,
            "memory": "4 GiB"
          }
        }
      },
      "streamingResourceSetting": {
        "resourceSettingMode": "EXPERT",
        "expertResourceSetting": {
          "jobmanagerResourceSettingSpec": {
            "cpu": 2,
            "memory": "4 GiB"
          },
          "resourcePlan": "{\\\"ssgProfiles\\\":[{\\\"name\\\":\\\"default\\\",\\\"cpu\\\":1.13,\\\"heap\\\":\\\"1 gb\\\",\\\"offHeap\\\":\\\"32 mb\\\",\\\"managed\\\":{},\\\"extended\\\":{}}],\\\"nodes\\\":[{\\\"id\\\":1,\\\"type\\\":\\\"StreamExecTableSourceScan\\\",\\\"desc\\\":\\\"Source: datagen_source[78]\\\",\\\"profile\\\":{\\\"group\\\":\\\"default\\\",\\\"parallelism\\\":1,\\\"maxParallelism\\\":32768,\\\"minParallelism\\\":1}},{\\\"id\\\":2,\\\"type\\\":\\\"StreamExecSink\\\",\\\"desc\\\":\\\"Sink: blackhole_sink[79]\\\",\\\"profile\\\":{\\\"group\\\":\\\"default\\\",\\\"parallelism\\\":1,\\\"maxParallelism\\\":32768,\\\"minParallelism\\\":1}}],\\\"edges\\\":[{\\\"source\\\":1,\\\"target\\\":2,\\\"mode\\\":\\\"PIPELINED\\\",\\\"strategy\\\":\\\"FORWARD\\\"}],\\\"vertices\\\":{\\\"717c7b8afebbfb7137f6f0f99beb2a94\\\":[1,2]}}"
        },
        "basicResourceSetting": {
          "parallelism": 4,
          "jobmanagerResourceSettingSpec": {
            "cpu": 2,
            "memory": "4 GiB"
          },
          "taskmanagerResourceSettingSpec": {
            "cpu": 2,
            "memory": "4 GiB"
          }
        }
      },
      "restoreStrategy": {
        "kind": "LATEST_STATE",
        "allowNonRestoredState": true,
        "jobStartTimeInMs": 1660293803155,
        "savepointId": "354dde66-a3ae-463e-967a-0b4107fd****"
      },
      "userFlinkConf": {
        "taskmanager.numberOfTaskSlots": "1",
        "table.exec.state.ttl": "128000s"
      }
    }
  ]
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
  • 本页导读 (1)
文档反馈