Reputation: 12930
I am dumping Kafka Log messages to see what's within the log files. However, it doesn't show any PayLoad.
Would someone please let me know what I am doing wrong?
see this
[gaurang.shah@hadoop_dev]$ cat 00000000000000000002.log
?B�i%f��i%f����������������testingD9�6pi%u%4i%u%4��������������$llllllllllll[gaurang.shah@hadoop_dev]$
[gaurang.shah@hadoop_dev]$ /usr/hdp/current/kafka-broker/bin/kafka-run-class.sh kafka.tools.DumpLogSegments --files 00000000000000000002.log --print-data-log
Dumping 00000000000000000002.log
Starting offset: 2
baseOffset: 2 lastOffset: 2 baseSequence: -1 lastSequence: -1 producerId: -1 producerEpoch: -1 partitionLeaderEpoch: 0 isTransactional: false position: 0 CreateTime: 1551110670527 isvalid: true size: 75 magic: 2 compresscodec: NONE crc: 507646879
baseOffset: 3 lastOffset: 3 baseSequence: -1 lastSequence: -1 producerId: -1 producerEpoch: -1 partitionLeaderEpoch: 0 isTransactional: false position: 75 CreateTime: 1551111628084 isvalid: true size: 80 magic: 2 compresscodec: NONE crc: 970929776
Upvotes: 3
Views: 2189
Reputation: 6613
Try to use following command: (add --deep-iteration
flag)
/usr/hdp/current/kafka-broker/bin/kafka-run-class.sh kafka.tools.DumpLogSegments --files 00000000000000000002.log --deep-iteration --print-data-log
Since v2.0, when --print-data-log
flag is passed deep-iteration
is enabled by default.
Upvotes: 1