gpt4 book ai didi

apache-kafka - Kafka 转储日志消息不显示负载

转载 作者:行者123 更新时间:2023-12-04 05:01:19 24 4
gpt4 key购买 nike

我正在转储 Kafka 日志消息以查看日志文件中的内容。但是,它不显示任何 PayLoad。

有人可以告诉我我做错了什么吗?

看到这个

[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

最佳答案

尝试使用以下命令:(添加--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

关于apache-kafka - Kafka 转储日志消息不显示负载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54870584/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com