kakfa-连接错误:无法找到或加载主类 [英] kakfa-connect error: cannot find or load main class
问题描述
我下面的官方的文档来实现中的 kakf连接
从文件中读取数据。
I am following the official docs to implement the kakf-connect
to read data from a file.
我有卡夫卡运行完美。生产者和消费者发送和接收消息。
I have kafka running perfectly. A producer and consumer sending and receiving messages.
然而,当我运行以下命令:
However, when I run the following command:
sudo ./bin/connect-standalone.sh config/connect-standalone.properties config/connect-file-source.properties
我收到以下错误:
I am getting the following error:
Error: Could not find or load main class org.apache.kafka.connect.cli.ConnectStandalone
我冲过检查,我有一个文件的 ConnectStandalone 这里连接/运行/ src目录/主/ JAVA /组织/阿帕奇/卡夫卡/连接/ CLI / ConnectStandalone
。
我的 connect-file-source.properties
如下:
name=local-file-source
connector.class=org.apache.kafka.connect.file.FileStreamSourceConnector
tasks.max=1
file=test.txt
topic=spark-kafka
有缺什么?我应该做什么摆脱这种错误的?
Is there something missing? What should I do to get rid of this error?
推荐答案
所以是相当无知的java我觉得现在的问题是,卡夫卡连接不包括在卡夫卡提供压缩包。
So being fairly java ignorant I think that the problem is that kafka-connect isn't included in the tarballs that kafka provides.
我,而不是切换到使用融合平台,并连接使用压缩包伟大的作品:
I instead switched to using the confluent platform, and connect works great using that tarball:
http://www.confluent.io/developer#download
这篇关于kakfa-连接错误:无法找到或加载主类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!