flink自定义connector相关报错

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

flink自定义connector相关报错

MOBIN


请教下,在自定义connector,IDEA上直接运demo时报了以下的错误:
org.apache.flink.table.api.NoMatchingTableFactoryException: Could not find a suitable table factory for 'org.apache.flink.table.factories.TableSinkFactory' in
the classpath.


工程的resource目录也准确引入了META-INF.services/org.apache.flink.table.factories.Factory,但是感觉没生效一样
Tabel-common依赖也已经引入了
谢谢
| |
MOBIN
|
签名由网易邮箱大师定制

Reply | Threaded
Open this post in threaded view
|

Re: flink自定义connector相关报错

Leonard Xu
路径错了

> 在 2021年6月2日,17:02,MOBIN <[hidden email]> 写道:
>
> META-INF.services/org.apache.flink.table.factories.Factory

=>   META-INF/services/org.apache.flink.table.factories.Factory

祝好
Leonard
Reply | Threaded
Open this post in threaded view
|

回复: flink自定义connector相关报错

MOBIN


Sorry, 工程下路径是没错的,是我发邮件时打错了,还可能是什么原因导致的呢?谢谢
src/main/resources/META-INF/services
| |
MOBIN
|
签名由网易邮箱大师定制


在2021年06月2日 17:05,Leonard Xu<[hidden email]> 写道:
路径错了

在 2021年6月2日,17:02,MOBIN <[hidden email]> 写道:

META-INF.services/org.apache.flink.table.factories.Factory

=>   META-INF/services/org.apache.flink.table.factories.Factory

祝好
Leonard
Reply | Threaded
Open this post in threaded view
|

Re: flink自定义connector相关报错

chenlei677
In reply to this post by MOBIN
你好,还有完整信息么?一般逻辑是,先找文件,然后匹配属性。麻烦将完整日志输出出来看看。



--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

回复: flink自定义connector相关报错

MOBIN

你好 ,日志如附件

CREATE TABLE redistest(username string, c string)
WITH (
'connector.type' = 'redis',
'host'='localhost',
'port'='6379'
)
签名由 网易邮箱大师 定制

2021年06月2日 17:35[hidden email] 写道:
你好,还有完整信息么?一般逻辑是,先找文件,然后匹配属性。麻烦将完整日志输出出来看看。



--
Sent from: http://apache-flink.147419.n8.nabble.com/

log.txt (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: flink自定义connector相关报错

Zorro
In reply to this post by MOBIN
看日志中提示required字段没有给全:
Reason: Required context properties mismatch.

The following properties are requested:
connector.type=redis
host=localhost
port=6379
schema.0.data-type=VARCHAR(2147483647)
schema.0.name=username
schema.1.data-type=VARCHAR(2147483647)
schema.1.name=c

你的requiredOptions()函数中是不是添加了schema*那几个参数



--
Sent from: http://apache-flink.147419.n8.nabble.com/