在 Flink 中使用 BlinkPlanner

Using BlinkPlanner in Flink

我正在阅读有关如何使用 "BlinkPlanner" 的 documentation,我发现可以使用以下代码创建 TableEnvironmentImpl 的实例以上:

import org.apache.flink.table.api.{EnvironmentSettings, TableEnvironment}

val bbSettings = EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build()
val bbTableEnv = TableEnvironment.create(bbSettings)

是否可以创建一个 BatchTableEnviromentImpl 的实例,它也使用 "BlinkPlanner"?我更喜欢使用 BatchTableEnviroment,因为它公开了比标准实现更多的方法,例如 toDataSet

不可以将 BlinkPlannerBatchTableEnvironment 一起使用。

Blink 规划器仅适用于 DataStream api 批处理和流式处理。实际上,计划是完全弃用 DataSet。计划有一个等价于 BatchTableEnvironment 的方法,例如toBoundedStream。不过,我们可以添加它的最早可能版本是 1.11。