dajac opened a new pull request, #24287:
URL: https://github.com/apache/kafka/pull/24287
The message formatters that decode the records of the internal
coordinator topics write the JSON of each record without a line
separator, and the console consumer adds none. When
`kafka-console-consumer.sh` reads `__consumer_offsets`,
`__transaction_state` or `__share_group_state` with one of them, all
the records are printed back to back on a single line, which is hard
to read and to process with line-based tools such as `grep`.
For instance:
```
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 \
--topic __consumer_offsets --from-beginning \
--formatter org.apache.kafka.tools.consumer.OffsetsMessageFormatter
```
The affected formatters are:
- `org.apache.kafka.tools.consumer.GroupMetadataMessageFormatter`,
`OffsetsMessageFormatter` and `TransactionLogMessageFormatter`, since
4.0.
- `org.apache.kafka.tools.consumer.ShareGroupMessageFormatter` and
`org.apache.kafka.tools.consumer.group.share.ShareGroupStateMessageFormatter`,
since 4.1.
This patch writes a line separator after each record in
`CoordinatorRecordMessageFormatter`, the base class of these
formatters, and updates `CoordinatorRecordMessageFormatterTest` to
expect it.
--
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]