如何设置s3sinkconnector(找不到类)

eagi6jfj  于 2021-06-06  发布在  Kafka
关注(0)|答案(1)|浏览(339)

如何将s3sinkconnector设置为将数据从主题流式传输到s3存储桶?我从confluent hub下载了一个插件,创建了一个文件 connect-standalone.properties 以及 s3-sink.properties .
当我想跑的时候 ./connect-standalone.sh connect-standalone.properties s3-sink.properties ,我有个错误:

[2019-06-25 15:43:52,841] ERROR Failed to create job for s3-sink.properties (org.apache.kafka.connect.cli.ConnectStandalone:102)
[2019-06-25 15:43:52,842] ERROR Stopping after connector error (org.apache.kafka.connect.cli.ConnectStandalone:113)
java.util.concurrent.ExecutionException: org.apache.kafka.connect.errors.ConnectException: Failed to find any class that implements Connector and which name matches io.confluent.connect.s3.S3SinkConnector

但我可以看到这个插件是可用的:

available connectors are: PluginDesc{klass=class io.confluent.connect.s3.S3SinkConnector, name='io.confluent.connect.s3.S3SinkConnector', version='5.2.2', encodedVersion=5.2.2, type=sink, typeName='sink', location='file:/home/ec2-user/kafka-plugins/confluentinc-kafka-connect-s3-5.2.2/'}

另外,我还尝试使用 export CLASSPATH=/home/ec2-user/kafka-plugins 但还是不走运。
如何使用aws msk设置连接器?

zbdgwd5y

zbdgwd5y1#

不应该导出类路径
您必须在连接独立属性中设置它

plugin.path=/home/ec2-user/kafka-plugins

相关问题