dongjoon-hyun 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_r249139338
##########
File path:
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeSorterSpillReader.java
##########
@@ -60,10 +60,9 @@ public UnsafeSorterSpillReader(
final ConfigEntry<Object> bufferSizeConfigEntry =
package$.MODULE$.UNSAFE_SORTER_SPILL_READER_BUFFER_SIZE();
// This value must be less than or equal to MAX_BUFFER_SIZE_BYTES. Cast to
int is always safe.
- final int DEFAULT_BUFFER_SIZE_BYTES =
(int)(long)bufferSizeConfigEntry.defaultValue().get();
- int bufferSizeBytes =
- SparkEnv.get() == null ?
- DEFAULT_BUFFER_SIZE_BYTES :
(int)SparkEnv.get().conf().get(bufferSizeConfigEntry);
+ final int DEFAULT_BUFFER_SIZE_BYTES =
((Long)bufferSizeConfigEntry.defaultValue().get()).intValue();
Review comment:
Could you fix the Java coding style issue?
----------------------------------------------------------------
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]