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


##########
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:
   Done. `sizeCheckSum` is assigned directly and `validateHeader` reads the 
field, so the temp and the extra parameter are gone.



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