You need to enable JavaScript to run this app.
导航
GetApplicationInstance - 查询作业实例
最近更新时间:2024.11.06 00:31:11首次发布时间:2024.10.31 11:30:33

查询指定作业实例信息

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

GetApplicationInstance

要执行的操作,取值:GetApplicationInstance。

Version
String

2025-01-01

API的版本,取值:2025-01-01。

InstanceId
String

1840646077740994561

实例ID

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
Conf
String

{\n "kubernetes.jobmanager.cpu":"1",\n "jobmanager.memory.process.size":"4096mb",\n "kubernetes.taskmanager.cpu":"1",\n "taskmanager.memory.process.size":"4096mb",\n "taskmanager.numberOfTaskSlots":"2",\n "restart-strategy": "aggregated-failure-rate",\n "restart-strategy.aggregated-failure-rate.failure-rate-interval": "600second",\n "restart-strategy.aggregated-failure-rate.delay": "20second",\n "restart-strategy.aggregated-failure-rate.max-failures-per-interval": "20",\n "execution.checkpointing.interval":"180s",\n "execution.checkpointing.timeout":"600s",\n "parallelism.default":"2"}

作业配置,json string

ApplicationId
String

s-1840646077740994561

作业的 application id(同个作业的实例多次启停该值会变化)对应 k8s 的 application_id

Args
String

--topic pyjstorm-test-1 --bootstrap.servers kafka-cnnxxm5tg2otd0.kafka.ivolces.com:9092

datastream main args (针对 Jar作业)

AccountId
String

2101007020

火山租户 accountId

Id
String

1840646077740994561

作业实例 Id

JobType
String

FLINK_STREAMING_SQL

作业类型

JobName
String

sql_test_16

作业名

JobId
String

1840646077740994562

作业实例所属 AppId

Jar
String

tos://mt-gts//gls/lib/flink.jar

datastream 主 jar(建议使用 tos地址) (针对 Jar作业)

EngineVersion
String

FLINK_VERSION_1_16

引擎版本

EndTime
String

2024-09-30 15:53:17

作业实例停止时间

DeploymentId
String

0389aeb7e5d64220ac5b6e9b78ed7c1b

任务在k8s环境的deployment id(同一个作业的实例多次启停该值不变)

DeployRequest
Object

{
"Queue": "o-0080kuwxxx",
"Priority": "3",
"ResourcePool": "rs-pool-a",
"SchedulePolicy": "GANG",
"ScheduleTimeout": "60"
}

部署策略(见公共结构2.1.4)

Dependency
Object

{
"Jars": ["tos://a.jar","tos://b.jar"]
}

外部依赖

CompleteRestUrl
String

http://6fafc4ed51ad433ca6a90629d6a901de-ingress.openstudio.ivolces.com:80/login-server/ui/t34be7bfc91e14ac8a02650b3b45172f0-rest.o-00g0kdtxl0e4:8081/

flink 完整的 url 路径

MainClass
String

com.bytedance.openplatform.flink.DatagenToPrint

datastream 主类 (针对 Jar作业)

ProjectId
String

cja21wx8gr9q

项目id

SqlText
String

create table orders (\n f0 varchar\n) WITH (\n 'connector' = 'datagen'\n);\n\ninsert into hive.flink.t1\nselect * from orders;

sql作业的 sqlText (针对SQL)

StartTime
String

2024-09-30 14:53:17

作业实例启动时间

State
String

RUNNING

作业实例状态

UserId
String

f75c80a288084c91b22b04c25e36a2c8

flink 内部userId

请求示例

POST /?Action=GetApplicationInstance&Version=2025-01-01&ProjectId=cja21wx8gr9q HTTP/1.1
Host: open.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20241028T080739Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20241028/cn-beijing/flink/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f

{
  "InstanceId": "1840646077740994561"
}

返回示例

{
  "ResponseMetadata": {
    "RequestId": "20241028160746227112206173C56A5C",
    "Action": "GetApplicationInstance",
    "Version": "2025-01-01",
    "Service": "flink",
    "Region": "cn-beijing"
  },
  "Result": {
    "ApplicationId": "s-1840646077740994561",
    "Args": "--topic pyjstorm-test-1 --bootstrap.servers kafka-cnnxxm5tg2otd0.kafka.ivolces.com:9092",
    "AccountId": "2101007020",
    "Id": "1840646077740994561",
    "JobType": "FLINK_STREAMING_SQL",
    "JobName": "sql_test_16",
    "JobId": "1840646077740994562",
    "Jar": "tos://mt-gts//gls/lib/flink.jar",
    "EngineVersion": "FLINK_VERSION_1_16",
    "EndTime": "2024-09-30 15:53:17",
    "DeploymentId": "0389aeb7e5d64220ac5b6e9b78ed7c1b",
    "DeployRequest": {
      "Priority": 5,
      "ResourcePool": "test-resource-pool",
      "SchedulePolicy": "GANG",
      "ScheduleTimeout": "60",
      "Namespace": "o-0080sv6hfmn6",
      "Queue": "\"o-00g0ouqtg9n7\""
    },
    "Dependency": {
      "Jars": [
        "[\"tos://a.jar\", \"tos://b.jar\"]"
      ],
      "PyLibraries": [
        "Qo"
      ]
    },
    "Conf": {},
    "CompleteRestUrl": "http://6fafc4ed51ad433ca6a90629d6a901de-ingress.openstudio.ivolces.com:80/login-server/ui/t34be7bfc91e14ac8a02650b3b45172f0-rest.o-00g0kdtxl0e4:8081/",
    "MainClass": "com.bytedance.openplatform.flink.DatagenToPrint",
    "ProjectId": "cja21wx8gr9q",
    "SqlText": "create table orders (\\n f0 varchar\\n) WITH (\\n 'connector' = 'datagen'\\n);\\n\\ninsert into hive.flink.t1\\nselect * from orders;",
    "StartTime": "2024-09-30 14:53:17",
    "State": "RUNNING",
    "UserId": "f75c80a288084c91b22b04c25e36a2c8"
  }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
200
default system error
can't get instance with id xxx

获取 instance 实例失败,具体失败原因参照 error message