yihua commented on code in PR #20321:
URL: https://github.com/apache/hudi/pull/20321#discussion_r4287087210
##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileBlock.java:
##########
@@ -126,9 +126,8 @@ protected HFileBlock(HFileContext context,
byteBuff, startOffsetInBuff +
Header.UNCOMPRESSED_SIZE_WITHOUT_HEADER_INDEX);
this.bytesPerChecksum = readInt(
byteBuff, startOffsetInBuff + Header.BYTES_PER_CHECKSUM_INDEX);
- this.sizeCheckSum = bytesPerChecksum > 0
- ? numChecksumBytes(getOnDiskSizeWithHeader(), bytesPerChecksum) : -1;
validateHeader(byteBuff, startOffsetInBuff);
+ this.sizeCheckSum = (int) numChecksumBytes(getOnDiskSizeWithHeader(),
bytesPerChecksum);
Review Comment:
nit: still keep use a temporary variable to store the long value and pass
that to `validateHeader`, and reuse here
--
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]