Kafka转储日志消息不显示有效负载

tkclm6bt  于 2021-06-04  发布在  Kafka
关注(0)|答案(1)|浏览(319)

我正在转储kafka日志消息以查看日志文件中的内容。但是,它没有显示任何有效负载。
有人能告诉我我做错了什么吗?
看到这个了吗

[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
qc6wkl3g

qc6wkl3g1#

尝试使用以下命令:(add) --deep-iteration (标志) /usr/hdp/current/kafka-broker/bin/kafka-run-class.sh kafka.tools.DumpLogSegments --files 00000000000000000002.log --deep-iteration --print-data-log 从v2.0开始,什么时候 --print-data-log 标志已通过 deep-iteration 默认情况下启用。

相关问题