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 05:34:48 UTC

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

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



##########
File path: clients/src/main/java/org/apache/kafka/common/record/Record.java
##########
@@ -132,4 +121,16 @@
      * @return the array of headers
      */
     Header[] headers();
+
+    static void ensureValid(Record record) {
+        if (record instanceof AbstractLegacyRecordBatch) {
+            ((AbstractLegacyRecordBatch) record).ensureValid();
+        }
+    }
+
+    static boolean isValid(Record record) {
+        if (record instanceof AbstractLegacyRecordBatch) {
+            return ((AbstractLegacyRecordBatch) record).isValid();
+        } else return true;

Review comment:
       Why is this change an improvement?




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