You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/04/15 04:09:02 UTC

[GitHub] [kafka] ijuma commented on a change in pull request #10498: MINOR: remove checksumOrNull from Record

ijuma commented on a change in pull request #10498:
URL: https://github.com/apache/kafka/pull/10498#discussion_r613742636



##########
File path: core/src/main/scala/kafka/tools/DumpLogSegments.scala
##########
@@ -270,7 +270,11 @@ object DumpLogSegments {
 
             var prefix = s"${RecordIndent} "
             if (!skipRecordMetadata) {
-              print(s"${prefix}offset: ${record.offset} isValid: ${record.isValid} crc: ${record.checksumOrNull}" +
+              val checksum = record match {
+                case r: AbstractLegacyRecordBatch => r.checksum().toString
+                case _ => "null"
+              }

Review comment:
       I think we should skip the checksum string altogether at record level for message format v2 and later.




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