You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ch...@apache.org on 2020/11/21 07:56:44 UTC
[kafka] branch trunk updated: KAFKA-6181 Examining log messages
with {{--deep-iteration}} should show superset of fields (#9204)
This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 6e3bf1e KAFKA-6181 Examining log messages with {{--deep-iteration}} should show superset of fields (#9204)
6e3bf1e is described below
commit 6e3bf1eaab55db531b298dc018779b9cece1e165
Author: Prithvi <ip...@gmail.com>
AuthorDate: Sat Nov 21 13:25:46 2020 +0530
KAFKA-6181 Examining log messages with {{--deep-iteration}} should show superset of fields (#9204)
Reviewers: Chia-Ping Tsai <ch...@gmail.com>
---
core/src/main/scala/kafka/tools/DumpLogSegments.scala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/core/src/main/scala/kafka/tools/DumpLogSegments.scala b/core/src/main/scala/kafka/tools/DumpLogSegments.scala
index fe97c03..b07bb5f 100755
--- a/core/src/main/scala/kafka/tools/DumpLogSegments.scala
+++ b/core/src/main/scala/kafka/tools/DumpLogSegments.scala
@@ -258,8 +258,12 @@ object DumpLogSegments {
}
lastOffset = record.offset
- print(s"$RecordIndent offset: ${record.offset} ${batch.timestampType}: ${record.timestamp} " +
- s"keysize: ${record.keySize} valuesize: ${record.valueSize}")
+ print(s"$RecordIndent offset: ${record.offset} isValid: ${record.isValid} crc: ${record.checksumOrNull}" +
+ s" keySize: ${record.keySize} valueSize: ${record.valueSize} ${batch.timestampType}: ${record.timestamp}" +
+ s" baseOffset: ${batch.baseOffset} lastOffset: ${batch.lastOffset} baseSequence: ${batch.baseSequence}" +
+ s" lastSequence: ${batch.lastSequence} producerEpoch: ${batch.producerEpoch} partitionLeaderEpoch: ${batch.partitionLeaderEpoch}" +
+ s" batchSize: ${batch.sizeInBytes} magic: ${batch.magic} compressType: ${batch.compressionType} position: ${validBytes}")
+
if (batch.magic >= RecordBatch.MAGIC_VALUE_V2) {
print(" sequence: " + record.sequence + " headerKeys: " + record.headers.map(_.key).mkString("[", ",", "]"))