10110346 commented on a change in pull request #23550: [SPARK-26621][CORE]Use 
ConfigEntry for hardcoded configs for shuffle categories.
URL: https://github.com/apache/spark/pull/23550#discussion_r248507951
 
 

 ##########
 File path: 
core/src/main/java/org/apache/spark/shuffle/sort/BypassMergeSortShuffleWriter.java
 ##########
 @@ -104,7 +105,7 @@
       SparkConf conf,
       ShuffleWriteMetricsReporter writeMetrics) {
     // Use getSizeAsKb (not bytes) to maintain backwards compatibility if no 
units are provided
-    this.fileBufferSize = (int) conf.getSizeAsKb("spark.shuffle.file.buffer", 
"32k") * 1024;
+    this.fileBufferSize = (int) (long) 
conf.get(package$.MODULE$.SHUFFLE_FILE_BUFFER_SIZE()) * 1024;
 
 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 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