10110346 commented on a change in pull request #24187: 
[SPARK-27256][CORE][SQL]If the configuration is used to set the number of 
bytes, we'd better use `bytesConf`'.
URL: https://github.com/apache/spark/pull/24187#discussion_r268600484
 
 

 ##########
 File path: 
core/src/main/java/org/apache/spark/shuffle/sort/UnsafeShuffleWriter.java
 ##########
 @@ -144,7 +144,7 @@ public UnsafeShuffleWriter(
     this.sparkConf = sparkConf;
     this.transferToEnabled = sparkConf.getBoolean("spark.file.transferTo", 
true);
     this.initialSortBufferSize =
-      (int) sparkConf.get(package$.MODULE$.SHUFFLE_SORT_INIT_BUFFER_SIZE());
+      (int) (long) 
sparkConf.get(package$.MODULE$.SHUFFLE_SORT_INIT_BUFFER_SIZE());
 
 Review comment:
   If we don't convert to long first , it will encounter exception like this:
   `Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to 
java.lang.Integer`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to