开发者社区> 问答> 正文

flink clickhouse connector

hi 想问一下有小伙伴使用flink 往clickhouse里面写数据嘛?我是使用的https://help.aliyun.com/document_detail/185696.html?spm=a2c4g.11186623.6.606.6222693bubxXzX 这个flink-connector,但是运行报错了: 

Caused by: java.io.IOException: unable to establish connection to ClickHouse 

at com.aliyun.flink.connector.clickhouse.table.internal.ClickHouseShardOutputFormat.open(ClickHouseShardOutputFormat.java:79) 

at org.apache.flink.streaming.api.functions.sink.OutputFormatSinkFunction.open(OutputFormatSinkFunction.java:65) 

at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:36) 

at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102) 

at org.apache.flink.table.runtime.operators.sink.SinkOperator.open(SinkOperator.java:73) 

at org.apache.flink.streaming.runtime.tasks.OperatorChain.initializeStateAndOpenOperators(OperatorChain.java:291) 

at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$beforeInvoke$0(StreamTask.java:479) 

at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.runThrowing(StreamTaskActionExecutor.java:92) 

at org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:475) 

at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:528) 

at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:721) 

at org.apache.flink.runtime.taskmanager.Task.run(Task.java:546) 

at java.lang.Thread.run(Thread.java:748) 

Caused by: java.io.IOException: table default.traffic is not a Distributed table 

at com.aliyun.flink.connector.clickhouse.table.internal.ClickHouseShardOutputFormat.establishShardConnections(ClickHouseShardOutputFormat.java:96) 

at com.aliyun.flink.connector.clickhouse.table.internal.ClickHouseShardOutputFormat.open(ClickHouseShardOutputFormat.java:76) 

... 12 more 

但 traffic 这个表我在clickhouse里面创建了,flink版本是1.11 

有小伙伴成功对接的嘛,可否分享一下connector呀*来自志愿者整理的flink邮件归档

展开
收起
又出bug了-- 2021-12-02 13:22:13 1187 0
1 条回答
写回答
取消 提交回答
  • 我这也是往clickhouse写数据,用官方的或是其他第三方的JDBC驱动(我用的https://github.com/blynkkk/clickhouse4j),然后用JdbcSink就能写入了,不需要另外写connector。*来自志愿者整理的FLINK邮件归档

    2021-12-02 14:22:47
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Flink CDC Meetup PPT - 龚中强 立即下载
Flink CDC Meetup PPT - 王赫 立即下载
Flink CDC Meetup PPT - 覃立辉 立即下载