yihua commented on code in PR #20321:
URL: https://github.com/apache/hudi/pull/20321#discussion_r4287159417
##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileBlock.java:
##########
@@ -231,15 +240,12 @@ static int numChecksumBytes(long numBytes, int
bytesPerChecksum) {
* @param bytesPerChecksum number of bytes in a checksum chunk.
* @return the number of checksum chunks.
*/
- static int numChecksumChunks(long numBytes, int bytesPerChecksum) {
+ static long numChecksumChunks(long numBytes, int bytesPerChecksum) {
long numChunks = numBytes / bytesPerChecksum;
if (numBytes % bytesPerChecksum != 0) {
numChunks++;
}
- if (numChunks > Integer.MAX_VALUE / HFileBlock.CHECKSUM_SIZE) {
- throw new IllegalArgumentException("The number of chunks is too large: "
+ numChunks);
- }
Review Comment:
We still need this check; just that the type is switched to long for
processing.
--
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]