【发布时间】:2022-08-17 22:54:02
【问题描述】:
我想为使用 Table API 编写的 Flink 应用程序设置一个 Job Name,就像我使用 Streaming API env.execute(jobName) 一样。
我想更换:
除了在从罐
bin/flink run -d -yD pipeline.name=MyPipelineName-v1.0 ...
- 闪现:1.14.5
- 环境:纱
更新:
万一有人遇到同样的情况。我们可以将 Table API 管道添加到 Data Stream API Doc,这样就可以让我们自己设置作业名称。
前任。:
val sinkDescriptor = TableDescriptor.forConnector(\"kafka\")
.option(\"topic\",\"topic_out\")
.option(\"properties.bootstrap.servers\", \"localhost:9092\")
.schema(schema)
.format(FormatDescriptor.forFormat(\"avro\").build())
.build()
tEnv.createTemporaryTable(\"OutputTable\", sinkDescriptor)
statementSet.addInsert(sinkDescriptor, tA)
statementSet.attachAsDataStream()
env.execute(jobName)
标签: apache-flink