You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/08/01 23:54:00 UTC

[jira] [Commented] (KAFKA-8745) DumpLogSegments doesn't show keys, when the message is null

    [ https://issues.apache.org/jira/browse/KAFKA-8745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16898438#comment-16898438 ] 

ASF GitHub Bot commented on KAFKA-8745:
---------------------------------------

wushujames commented on pull request #7152: KAFKA-8745: DumpLogSegments doesn't show keys, when the message is null
URL: https://github.com/apache/kafka/pull/7152
 
 
   Make sure to show the message key, even when the message value is null.
   
   This changes the output of one of the tools. Is the output of the tool considered a public API? Does this need a discussion or a KIP?
   
   Testing: Ran the tool on a compacted topic. Previously, the tool did not show any message keys for tombstone messages (messages where the value is null). Now, the tool shows message keys.
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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
>            Assignee: James Cheng
>            Priority: Major
>
> 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)