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


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

Review Comment:
   sg. Will add the comment.
   
   in HFileBlock:
   >   /** An additional sanity-check in case no compression or encryption is 
being used. */
     void sanityCheckUncompressed() throws IOException {
       if (onDiskSizeWithoutHeader != uncompressedSizeWithoutHeader + 
totalChecksumBytes()) {
         throw new IOException("Using no compression but " + 
"onDiskSizeWithoutHeader="
           + onDiskSizeWithoutHeader + ", " + "uncompressedSizeWithoutHeader="
           + uncompressedSizeWithoutHeader + ", numChecksumbytes=" + 
totalChecksumBytes());
       }
     }



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