Can't load kafka-0.10 DynamicTableSourceFactory

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't load kafka-0.10 DynamicTableSourceFactory

jie mei
Hi, Community

当我使用flink命令启动一个使用了kafka-0.10 source 表的任务报了如下错误。 我使用的flink版本是1.11.2

> Could not find any factory for identifier 'kafka-0.10' that implements
'org.apache.flink.table.factories.DynamicTableSourceFactory' in the
classpath.

我确定我的jar文件里有以下相关目录和文件。

1. /META-INF/services/org.apache.flink.table.factories.TableFactory
content: org.apache.flink.streaming.connectors.kafka.Kafka010TableSourceSinkFactory

2. [自定义] /META-INF/services/org.apache.flink.table.factories.Factory
content: com.voxlearning.xue.continues.sink.clickhouse.ClickHouseDynamicTableFactory

3. org/apache/flink/streaming/connectors/kafka
content: Kafka010TableSourceSinkFactory.class

所以,我还忽略了什么排查点来确认问题呢? 如果需要任何额外信息请让我知道,谢谢。

--

*Best Regards*
*Jeremy Mei*
Reply | Threaded
Open this post in threaded view
|

Re:Can't load kafka-0.10 DynamicTableSourceFactory

hailongwang
Hi,
  Kafka010TableSourceSinkFactory 是表示使用 legacy property keys,
  Kafka010DynamicTableFactory 表示使用 new property keys[1]
从你的报错来看,是使用了 new property。所以需要在/META-INF/services/org.apache.flink.table.factories.Factory 存在值:org.apache.flink.streaming.connectors.kafka.table.Kafka010DynamicTableFactory
并且 classload 里需要存在类 org.apache.flink.streaming.connectors.kafka.table.Kafka010DynamicTableFactory


[1] https://cwiki.apache.org/confluence/display/FLINK/FLIP-122%3A+New+Connector+Property+Keys+for+New+Factory




Best,
Hailong
在 2020-12-14 19:41:06,"meijie.work" <[hidden email]> 写道:

>Hi, Community
>
>当我使用flink命令启动一个使用了kafka-0.10 source 表的任务报了如下错误。 我使用的flink版本是1.11.2
>
>> Could not find any factory for identifier 'kafka-0.10' that implements
>'org.apache.flink.table.factories.DynamicTableSourceFactory' in the
>classpath.
>
>我确定我的jar文件里有以下相关目录和文件。
>
>1. /META-INF/services/org.apache.flink.table.factories.TableFactory
>content: org.apache.flink.streaming.connectors.kafka.Kafka010TableSourceSinkFactory
>
>2. [自定义] /META-INF/services/org.apache.flink.table.factories.Factory
>content: com.voxlearning.xue.continues.sink.clickhouse.ClickHouseDynamicTableFactory
>
>3. org/apache/flink/streaming/connectors/kafka
>content: Kafka010TableSourceSinkFactory.class
>
>所以,我还忽略了什么排查点来确认问题呢? 如果需要任何额外信息请让我知道,谢谢。
>
>--
>
>*Best Regards*
>*Jeremy Mei*