Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14726#discussion_r75574332
  
    --- Diff: 
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeSorterSpillReader.java
 ---
    @@ -22,15 +22,21 @@
     import com.google.common.io.ByteStreams;
     import com.google.common.io.Closeables;
     
    +import org.apache.spark.SparkEnv;
     import org.apache.spark.serializer.SerializerManager;
     import org.apache.spark.storage.BlockId;
     import org.apache.spark.unsafe.Platform;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
     
     /**
      * Reads spill files written by {@link UnsafeSorterSpillWriter} (see that 
class for a description
      * of the file format).
      */
     public final class UnsafeSorterSpillReader extends UnsafeSorterIterator 
implements Closeable {
    +  private static final Logger logger = 
LoggerFactory.getLogger(UnsafeSorterSpillReader.class);
    +  private static final int DEFAULT_BUFFER_SIZE_BYTES = 1024 * 1024; // 1 MB
    --- End diff --
    
    Yes, hierarchical merging sounds good. Actually we might even want to 
memory management the buffers more explicitly (just ask the memory manager for 
spark.unsafe.sorter.spill.reader.buffer.size for every spill file we open.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to