[ https://issues.apache.org/jira/browse/KAFKA-4108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15534350#comment-15534350 ]
ASF GitHub Bot commented on KAFKA-4108: --------------------------------------- GitHub user vahidhashemian opened a pull request: https://github.com/apache/kafka/pull/1937 KAFKA-4108: Improve DumpLogSegments offsets-decoder output format This PR improves the output format of DumpLogSegments when the `--offset-decoder` option is used for consuming `__consumer_offsets`, especially when it comes to group metadata. An example of the partial output with existing formatting: ``` key: metadata::console-consumer-40190 payload: consumer:range:1:{consumer-1-20240b92-fbf4-44d5-bf8c-66b6d70c9948=[foo-0]} ``` An example of the same output with suggested formatting: ``` key: {"metadata":"console-consumer-40190"} payload: {"protocolType":"consumer","groupMetadata.protocol":"range","groupMetadata.generationId":1,"assignment":"{consumer-1-20240b92-fbf4-44d5-bf8c-66b6d70c9948=[foo-0]}"} ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/vahidhashemian/kafka KAFKA-4108 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1937.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1937 ---- commit 55541e0df74c923c9917b0489212b269e25cf5aa Author: Vahid Hashemian <vahidhashem...@us.ibm.com> Date: 2016-09-29T22:53:55Z KAFKA-4108: Improve DumpLogSegments offsets-decoder output format This PR improves the output format of DumpLogSegments when the `--offset-decoder` option is used for consuming `__consumer_offsets`, especially when it comes to group metadata. An example of the partial output with existing formatting: ``` key: metadata::console-consumer-40190 payload: consumer:range:1:{consumer-1-20240b92-fbf4-44d5-bf8c-66b6d70c9948=[foo-0]} ``` An example of the same output with suggested formatting: ``` key: {"metadata":"console-consumer-40190"} payload: {"protocolType":"consumer","groupMetadata.protocol":"range","groupMetadata.generationId":1,"assignment":"{consumer-1-20240b92-fbf4-44d5-bf8c-66b6d70c9948=[foo-0]}"} ``` ---- > Improve DumpLogSegments offsets-decoder output format > ----------------------------------------------------- > > Key: KAFKA-4108 > URL: https://issues.apache.org/jira/browse/KAFKA-4108 > Project: Kafka > Issue Type: Improvement > Components: tools > Reporter: Jason Gustafson > Assignee: Vahid Hashemian > > When using the DumpLogSegments with the "--offsets-decoder" option (for > consuming __consumer_offsets), the encoding of group metadata makes it a > little difficult to identify individual fields. In particular, we use the > following formatted string for group metadata: > {code} > ${protocolType}:${groupMetadata.protocol}:${groupMetadata.generationId}:${assignment} > {code} > Keys have a similar formatting. Most users are probably not going to know > which field is which based only on the output, so it would be helpful to > include field names. Maybe we could just output a JSON object? -- This message was sent by Atlassian JIRA (v6.3.4#6332)