You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/08/10 03:09:27 UTC

[GitHub] [spark] LuciferYang commented on a change in pull request #33629: [SPARK-36407][CORE][SQL] Convert int to long to avoid potential integer multiplications overflow risk

LuciferYang commented on a change in pull request #33629:
URL: https://github.com/apache/spark/pull/33629#discussion_r685657521



##########
File path: common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/checksum/ShuffleChecksumHelper.java
##########
@@ -81,7 +81,7 @@ public static String getChecksumFileName(String blockName, String algorithm) {
 
   private static long readChecksumByReduceId(File checksumFile, int reduceId) throws IOException {
     try (DataInputStream in = new DataInputStream(new FileInputStream(checksumFile))) {
-      ByteStreams.skipFully(in, reduceId * 8);
+      ByteStreams.skipFully(in, reduceId * 8L);

Review comment:
       ```
   public static void skipFully(InputStream in, long n) throws IOException {
   ...
   }
   ```




-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org