Kafka Error: Could not find or load main class org

2019-07-20 16:45发布

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..

2条回答
smile是对你的礼貌
2楼-- · 2019-07-20 17:11

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

查看更多
啃猪蹄的小仙女
3楼-- · 2019-07-20 17:34

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.

查看更多
登录 后发表回答