Kafka文件流与csv文件位于远程计算机上?

2eafrhcq  于 2021-06-04  发布在  Kafka
关注(0)|答案(1)|浏览(285)

我用的是Kafka2.12-2.3.0。
我在我的centos linux机器上安装了kafka(a.a.a.a)。我想运行kafka filestreamsource from(a.a.a.a)to csv file placed on remote machine ip(b.b.b.b)。
connect-file-source.properties的代码是

name=shopfile
connector.class=FileStreamSource
tasks.max=1
file=//xxxxxx/xxx/ABC.csv   
topic=shop_topic

运行后

bin/connect-standalone.sh config/connect-standalone.properties config/connect-file-source.properties

我犯了个错误

[2019-09-19 21:34:30,790] WARN Couldn't find file //xxxxxx/xxx/ABC.csv  for FileStreamSourceTask, sleeping to wait for it to be created (org.apache.kafka.connect.file.FileStreamSourceTask:109)
[2019-09-19 21:34:31,790] WARN Couldn't find file //xxxxxx/xxx/ABC.csv  for FileStreamSourceTask, sleeping to wait for it to be created (org.apache.kafka.connect.file.FileStreamSourceTask:109)
[2019-09-19 21:34:32,791] WARN Couldn't find file //xxxxxx/xxx/ABC.csv for FileStreamSourceTask, sleeping to wait for it to be created (org.apache.kafka.connect.file.FileStreamSourceTask:109)

但是,这段代码在我的windows机器上运行良好。请帮帮我。。。

aor9mmx1

aor9mmx11#

filestreamsource不支持此操作。
您可以尝试安装ftp源连接器并让ftp服务器公开您的文件。https://github.com/eneco/kafka-connect-ftp

相关问题