brandboat opened a new pull request, #18173:
URL: https://github.com/apache/kafka/pull/18173

   related to KAFKA-18234, KIP-848 introduced one great feature: async regex 
resolution, and added a new record schema to the consumer offsets topic which 
need to be added to the OffsetsMessageParser in `kafka-dump-log.sh`.
   
   Here's an example of the output:
   
   ```
   ./bin/kafka-dump-log.sh --offsets-decoder --files 
~/Downloads/test_missing_key/broker_0_data0/__consumer_offsets-0/00000000000000000000.log
   Dumping 
/home/brandboat/Downloads/test_missing_key/broker_0_data0/__consumer_offsets-0/00000000000000000000.log
   SLF4J: Class path contains multiple SLF4J bindings.
   SLF4J: Found binding in 
[jar:file:/home/brandboat/Code/kafka/kafka/tools/build/dependant-libs-2.13.15/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   SLF4J: Found binding in 
[jar:file:/home/brandboat/Code/kafka/kafka/connect/runtime/build/dependant-libs/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   SLF4J: Found binding in 
[jar:file:/home/brandboat/Code/kafka/kafka/connect/mirror/build/dependant-libs/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
explanation.
   SLF4J: Actual binding is of type [org.slf4j.impl.Reload4jLoggerFactory]
   Log starting offset: 0
   baseOffset: 0 lastOffset: 5 count: 6 baseSequence: 0 lastSequence: 5 
producerId: -1 producerEpoch: -1 partitionLeaderEpoch: 0 isTransactional: false 
isControl: false deleteHorizonMs: OptionalLong.empty position: 0 CreateTime: 
1734106607728 size: 372 magic: 2 compresscodec: none crc: 1451647676 isvalid: 
true
   | offset: 0 CreateTime: 1734106607719 keySize: 38 valueSize: 53 sequence: 0 
headerKeys: [] key: 
{"type":"5","data":{"groupId":"test-group","memberId":"zMLYMk8-RP-nffdMMgcOHQ"}}
 payload: 
{"version":"0","data":{"instanceId":null,"rackId":null,"clientId":"consumer-test-group-1","clientHost":"/127.0.0.1","subscribedTopicNames":[],"subscribedTopicRegex":"test*","rebalanceTimeoutMs":300000,"serverAssignor":null,"classicMemberMetadata":null}}
   | offset: 1 CreateTime: 1734106607719 keySize: 14 valueSize: 7 sequence: 1 
headerKeys: [] key: {"type":"3","data":{"groupId":"test-group"}} payload: 
{"version":"0","data":{"epoch":1}}
   | offset: 2 CreateTime: 1734106607719 keySize: 38 valueSize: 4 sequence: 2 
headerKeys: [] key: 
{"type":"7","data":{"groupId":"test-group","memberId":"zMLYMk8-RP-nffdMMgcOHQ"}}
 payload: {"version":"0","data":{"topicPartitions":[]}}
   | offset: 3 CreateTime: 1734106607719 keySize: 14 valueSize: 7 sequence: 3 
headerKeys: [] key: {"type":"6","data":{"groupId":"test-group"}} payload: 
{"version":"0","data":{"assignmentEpoch":1}}
   | offset: 4 CreateTime: 1734106607719 keySize: 38 valueSize: 14 sequence: 4 
headerKeys: [] key: 
{"type":"8","data":{"groupId":"test-group","memberId":"zMLYMk8-RP-nffdMMgcOHQ"}}
 payload: 
{"version":"0","data":{"memberEpoch":1,"previousMemberEpoch":0,"state":0,"assignedPartitions":[],"partitionsPendingRevocation":[]}}
   | offset: 5 CreateTime: 1734106607728 keySize: 21 valueSize: 20 sequence: 5 
headerKeys: [] key: 
{"type":"16","data":{"groupId":"test-group","regularExpression":"test*"}} 
payload: 
{"version":"0","data":{"topics":[],"version":17,"timestamp":1734106607698}}
   ```
   
   before 
   ```
   | offset: 5 CreateTime: 1734107666076 keySize: 21 valueSize: 20 sequence: 5 
headerKeys: [] key: Unknown record type 16 at offset 5, skipping.
   ```
   
   after
   ```
   | offset: 5 CreateTime: 1734106607728 keySize: 21 valueSize: 20 sequence: 5 
headerKeys: [] key: 
{"type":"16","data":{"groupId":"test-group","regularExpression":"test*"}} 
payload: 
{"version":"0","data":{"topics":[],"version":17,"timestamp":1734106607698}}
   ```
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to