James Cheng created KAFKA-8745:
----------------------------------

             Summary: DumpLogSegments doesn't show keys, when the message is 
null
                 Key: KAFKA-8745
                 URL: https://issues.apache.org/jira/browse/KAFKA-8745
             Project: Kafka
          Issue Type: Improvement
          Components: tools
    Affects Versions: 2.3.0
            Reporter: James Cheng


When DumpLogSegments encounters a message with a message key, but no message 
value, it doesn't print out the message key.

 
{noformat}
$ ~/kafka_2.11-2.2.0/bin/kafka-run-class.sh kafka.tools.DumpLogSegments --files 
compacted-0/00000000000000000000.log --print-data-log
Dumping compacted-0/00000000000000000000.log
Starting offset: 0
baseOffset: 0 lastOffset: 3 count: 4 baseSequence: -1 lastSequence: -1 
producerId: -1 producerEpoch: -1 partitionLeaderEpoch: 0 isTransactional: false 
isControl: false position: 0 CreateTime: 1564696640073 size: 113 magic: 2 
compresscodec: NONE crc: 206507478 isvalid: true
| offset: 2 CreateTime: 1564696640073 keysize: 4 valuesize: -1 sequence: -1 
headerKeys: []
| offset: 3 CreateTime: 1564696640073 keysize: 4 valuesize: -1 sequence: -1 
headerKeys: []
{noformat}
It should print out the message key.

 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to