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_r247336035
 
 

 ##########
 File path: 
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeSorterSpillReader.java
 ##########
 @@ -59,21 +60,22 @@ public UnsafeSorterSpillReader(
       File file,
       BlockId blockId) throws IOException {
     assert (file.length() > 0);
+    final ConfigEntry<Object> bufferSizeConfigEntry =
+        package$.MODULE$.UNSAFE_SORTER_SPILL_READER_BUFFER_SIZE();
+    final long DEFAULT_BUFFER_SIZE_BYTES = 
(long)bufferSizeConfigEntry.defaultValue().get();
     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(bufferSizeConfigEntry);
 
 Review comment:
   Spaces around colon?
   ```java
   - 
DEFAULT_BUFFER_SIZE_BYTES:(long)SparkEnv.get().conf().get(bufferSizeConfigEntry);
   + DEFAULT_BUFFER_SIZE_BYTES : 
(long)SparkEnv.get().conf().get(bufferSizeConfigEntry);
   ```

----------------------------------------------------------------
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