我从GitHub下载了kafka-dev repo,并打算根据official page运行性能测试。
我构建了Kafka并在perf / README.md中运行命令:
./sbt
project perf
package-all
然后我启动了zookeeper和kafka服务器,最后(在perf目录中):
./run-simulator.sh -kafkaServer=localhost -numTopic=10 -reportFile=report-html/data -time=15 -numConsumer=20 -numProducer=40 -xaxis=numTopic
但测试失败了kafka.common.OffsetOutOfRangeException
,这里是错误信息:
Exception in thread "127.0.0.1-Consumer-10" kafka.common.OffsetOutOfRangeException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at kafka.common.ErrorMapping$.maybeThrowException(ErrorMapping.scala:53)
at kafka.message.ByteBufferMessageSet.kafka$message$ByteBufferMessageSet$$deepIterator(ByteBufferMessageSet.scala:104)
at kafka.message.ByteBufferMessageSet.deepValidBytes(ByteBufferMessageSet.scala:90)
at kafka.message.ByteBufferMessageSet.validBytes(ByteBufferMessageSet.scala:75)
at kafka.javaapi.message.ByteBufferMessageSet.validBytes(ByteBufferMessageSet.scala:57)
at kafka.perf.consumer.SimplePerfConsumer.run(SimplePerfConsumer.java:78)
...
有什么想法吗?