linliu-code commented on code in PR #13873:
URL: https://github.com/apache/hudi/pull/13873#discussion_r2338079322


##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileBlock.java:
##########
@@ -283,7 +286,11 @@ public ByteBuffer serialize() throws IOException {
     // 5. Checksum type.
     buf.put(context.getChecksumType().getCode());
     // 6. Bytes covered per checksum.
-    buf.putInt(DEFAULT_BYTES_PER_CHECKSUM);
+    // Note that: Default value is 16K. There is a check on
+    // onDiskSizeWithoutHeader = uncompressedSizeWithoutHeader + Checksum.
+    // In order to pass this check, either we make isUseHBaseChecksum false in 
HFileContext (hbase),
+    // or we set this value to zero.
+    buf.putInt(0);

Review Comment:
   Good question. I checked, and found that the checksum type is already `NULL` 
by default. Therefore, this check does not check checksum type first.



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