yihua commented on code in PR #13873:
URL: https://github.com/apache/hudi/pull/13873#discussion_r2338056228


##########
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:
   If the checksum type is `NULL`, does this still matter?



##########
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:
   Could you clarify which class in HBase has the check?  Also make it clear in 
the code comment.



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