【问题标题】:Set a Job Name to Flink job using Table API使用 Table API 将 Job Name 设置为 Flink 作业
【发布时间】: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


    【解决方案1】:

    只有 StreamExecutionEnvironment 在流图上调用setJobName

    【讨论】:

    • 谢谢大卫,我希望它有一天会改变,因为它不是监控多个 Flink 作业的非常直观的方式。
    猜你喜欢
    • 2022-10-20
    • 1970-01-01
    • 1970-01-01
    • 2020-07-24
    • 1970-01-01
    • 2018-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多