I think this was due to the type of file you fed to the tool. To use --index-sanity-check , you need to supply file with the following suffix:
val IndexFileSuffix = ".index" On Sat, Feb 10, 2018 at 2:09 PM, adrien ruffie <adriennolar...@hotmail.fr> wrote: > No really ... just the same output like this: > > > kafka_2.11-1.0.0$ ./bin/kafka-run-class.sh kafka.tools.DumpLogSegments > --files logs/kafka-1/customer-topic-0/00000000000000000000.log > --index-sanity-check > Dumping logs/kafka-1/customer-topic-0/00000000000000000000.log > Starting offset: 0 > baseOffset: 0 lastOffset: 0 baseSequence: -1 lastSequence: -1 producerId: > -1 producerEpoch: -1 partitionLeaderEpoch: 0 isTransactional: false > position: 0 CreateTime: 1518299032960 isvalid: true size: 91 magic: 2 > compresscodec: NONE crc: 3301617258 > > > moreover you can see my release 2.11-1.0.0 > > > thank for you response Ted ! > > ________________________________ > De : Ted Yu <yuzhih...@gmail.com> > Envoyé : samedi 10 février 2018 23:00:02 > À : users@kafka.apache.org > Objet : Re: DumpLogSegment > > For --index-sanity-check, according to dumpIndex(): > > if (indexSanityOnly) { > > index.sanityCheck > > println(s"$file passed sanity check.") > > > Do you see the print above ? > > > Which release of Kafka are you using ? > > > Cheers > > > On Sat, Feb 10, 2018 at 1:54 PM, adrien ruffie <adriennolar...@hotmail.fr> > wrote: > > > Hi all, > > > > In Kafka the definitive guide in page 200-201, two parameters of > > kafka.tools.DumpLogSegments appear not really work ... > > > > the --index-sanity-check argument > > > > the --print-data-log > > > > exemple: > > > > ./bin/kafka-run-class.sh kafka.tools.DumpLogSegments --files > > logs/kafka-0/customer-topic-0/00000000000000000000.log > > --index-sanity-check > > > > ./bin/kafka-run-class.sh kafka.tools.DumpLogSegments --files > > logs/kafka-0/customer-topic-0/00000000000000000000.log --print-data-log > > > > > > > > If I use it, I get the same output as: > > > > ./bin/kafka-run-class.sh kafka.tools.DumpLogSegments --files > > logs/kafka-0/customer-topic-0/00000000000000000000.log > > > > These previous arguments, aren't take account ? > > > > > > best regards, > > > > > > Adrien > > > > >