viirya commented on a change in pull request #23412: [SPARK-26477][CORE] Use
ConfigEntry for hardcoded configs for unsafe category
URL: https://github.com/apache/spark/pull/23412#discussion_r244538563
##########
File path:
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeSorterSpillReader.java
##########
@@ -61,19 +62,19 @@ public UnsafeSorterSpillReader(
assert (file.length() > 0);
long bufferSizeBytes =
SparkEnv.get() == null ?
- DEFAULT_BUFFER_SIZE_BYTES:
-
SparkEnv.get().conf().getSizeAsBytes("spark.unsafe.sorter.spill.reader.buffer.size",
- DEFAULT_BUFFER_SIZE_BYTES);
+ DEFAULT_BUFFER_SIZE_BYTES:(long)SparkEnv.get().conf().get(
+ package$.MODULE$.UNSAFE_SORTER_SPILL_READER_BUFFER_SIZE());
Review comment:
`package$.MODULE$.UNSAFE_SORTER_SPILL_READER_BUFFER_SIZE()` is used below
too. Extract it and reuse it?
----------------------------------------------------------------
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]