0


Flink TableAPI 依赖问题

一、报错内容

“Could not instantiate the executor. Make sure a planner module is on the classpath”

Exception in thread "main" org.apache.flink.table.api.TableException: Could not instantiate the executor. Make sure a planner module is on the classpath
    at org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.lookupExecutor(StreamTableEnvironmentImpl.java:194)
    at org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:156)
    at org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:128)
    at org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:98)
    at Test06_SQLJoin.main(Test06_SQLJoin.java:20)
Caused by: org.apache.flink.table.api.NoMatchingTableFactoryException: Could not find a suitable table factory for 'org.apache.flink.table.delegation.ExecutorFactory' in
the classpath.

Reason: No factory implements 'org.apache.flink.table.delegation.ExecutorFactory'.

The following properties are requested:
class-name=org.apache.flink.table.planner.delegation.BlinkExecutorFactory
streaming-mode=true

The following factories have been considered:
org.apache.flink.streaming.connectors.kafka.KafkaTableSourceSinkFactory
org.apache.flink.formats.json.JsonRowFormatFactory
org.apache.flink.connector.jdbc.table.JdbcTableSourceSinkFactory
org.apache.flink.table.sources.CsvBatchTableSourceFactory
org.apache.flink.table.sources.CsvAppendTableSourceFactory
org.apache.flink.table.sinks.CsvBatchTableSinkFactory
org.apache.flink.table.sinks.CsvAppendTableSinkFactory
org.apache.flink.table.module.CoreModuleFactory
    at org.apache.flink.table.factories.TableFactoryService.filterByFactoryClass(TableFactoryService.java:215)
    at org.apache.flink.table.factories.TableFactoryService.filter(TableFactoryService.java:176)
    at org.apache.flink.table.factories.TableFactoryService.findAllInternal(TableFactoryService.java:164)
    at org.apache.flink.table.factories.TableFactoryService.findAll(TableFactoryService.java:121)
    at org.apache.flink.table.factories.ComponentFactoryService.find(ComponentFactoryService.java:50)
    at org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.lookupExecutor(StreamTableEnvironmentImpl.java:185)
    ... 4 more

Process finished with exit code 1

二、解决办法

添加依赖

        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-table-planner-blink_${scala.version}</artifactId>
            <version>${flink.version}</version>
        </dependency>
标签: flink

本文转载自: https://blog.csdn.net/liuyong961104/article/details/126773429
版权归原作者 aimeralan01 所有, 如有侵权,请联系我们删除。

“Flink TableAPI 依赖问题”的评论:

还没有评论