Kafka Error: Could not find or load main class org.apache.kafka.clients.tools.ProducerPerformance

北慕城南 提交于 2019-12-11 01:08:41

问题


I was trying to run Performance test as per the following article for Apache Kafka

Reference:

https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines

Linked-in tests: https://gist.github.com/jkreps/c7ddb4041ef62a900e6c

But when I run this:

 bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=localhost:9092 buffer.memory=67108864 batch.size=8196

It shows the error:

Error: Could not find or load main class org.apache.kafka.clients.tools.ProducerPerformance

Is it about kafka version? Or I need to download the class from somewhere else?

Where is my org.apache.kafka.clients.tools.ProducerPerformance class? Please suggest..


回答1:


Package name of ProducerPerformance has been changed from org.apache.kafka.clients.tools to org.apache.kafka.tools.

For more details, check my answer for a possible duplicate question.




回答2:


I think you need to build the project first before running this command .. you can use build tool such as sbt as documented in their official web site



来源:https://stackoverflow.com/questions/24780849/kafka-error-could-not-find-or-load-main-class-org-apache-kafka-clients-tools-pr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!