错误
java.lang.IllegalArgumentException: requirement failed: Corrupt index found, index file (/home/sca_bj/jade/kafka_2.9.2-0.8.2.1/kafka-logs/test-0/00000000000000000009.index) has non-zero size but the last offset is 9 and the base offset is 9
at scala.Predef$.require(Predef.scala:214) at kafka.log.OffsetIndex.sanityCheck(OffsetIndex.scala:352) at kafka.log.Log$$anonfun$loadSegments$5.apply(Log.scala:184) at kafka.log.Log$$anonfun$loadSegments$5.apply(Log.scala:183) at scala.collection.Iterator$class.foreach(Iterator.scala:772) at scala.collection.JavaConversions$JIteratorWrapper.foreach(JavaConversions.scala:573) at scala.collection.IterableLike$class.foreach(IterableLike.scala:73) at scala.collection.JavaConversions$JCollectionWrapper.foreach(JavaConversions.scala:592) at kafka.log.Log.loadSegments(Log.scala:183) at kafka.log.Log.<init>(Log.scala:67) at kafka.log.LogManager$$anonfun$loadLogs$2$$anonfun$3$$anonfun$apply$7$$anonfun$apply$1.apply$mcV$sp(LogManager.scala:142) at kafka.utils.Utils$$anon$1.run(Utils.scala:54) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)[2015-07-15 16:07:35,904] INFO [Kafka Server 0], shutting down (kafka.server.KafkaServer)解决办法:
find kafka-logs/ -size 10485760c -name *.index #-delete
执行命令 把查到的文件都删掉
具体为啥不解释