Skip to content

Commit

Permalink
Rename UnsafeShuffleSpillWriter to UnsafeShuffleExternalSorter
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed May 7, 2015
1 parent 11feeb6 commit 8a6fe52
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.io.File;

/**
* Metadata for a block of data written by {@link UnsafeShuffleSpillWriter}.
* Metadata for a block of data written by {@link UnsafeShuffleExternalSorter}.
*/
final class SpillInfo {
final long[] partitionLengths;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
* spill files. Instead, this merging is performed in {@link UnsafeShuffleWriter}, which uses a
* specialized merge procedure that avoids extra serialization/deserialization.
*/
public final class UnsafeShuffleSpillWriter {
public final class UnsafeShuffleExternalSorter {

private final Logger logger = LoggerFactory.getLogger(UnsafeShuffleSpillWriter.class);
private final Logger logger = LoggerFactory.getLogger(UnsafeShuffleExternalSorter.class);

private static final int SER_BUFFER_SIZE = 1024 * 1024; // TODO: tune this / don't duplicate
private static final int PAGE_SIZE = 1024 * 1024; // TODO: tune this
Expand Down Expand Up @@ -86,14 +86,14 @@ public final class UnsafeShuffleSpillWriter {
private MemoryBlock currentPage = null;
private long currentPagePosition = -1;

public UnsafeShuffleSpillWriter(
TaskMemoryManager memoryManager,
ShuffleMemoryManager shuffleMemoryManager,
BlockManager blockManager,
TaskContext taskContext,
int initialSize,
int numPartitions,
SparkConf conf) throws IOException {
public UnsafeShuffleExternalSorter(
TaskMemoryManager memoryManager,
ShuffleMemoryManager shuffleMemoryManager,
BlockManager blockManager,
TaskContext taskContext,
int initialSize,
int numPartitions,
SparkConf conf) throws IOException {
this.memoryManager = memoryManager;
this.shuffleMemoryManager = shuffleMemoryManager;
this.blockManager = blockManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void freeMemory() {

private SpillInfo[] insertRecordsIntoSorter(
scala.collection.Iterator<? extends Product2<K, V>> records) throws Exception {
final UnsafeShuffleSpillWriter sorter = new UnsafeShuffleSpillWriter(
final UnsafeShuffleExternalSorter sorter = new UnsafeShuffleExternalSorter(
memoryManager,
shuffleMemoryManager,
blockManager,
Expand Down

0 comments on commit 8a6fe52

Please sign in to comment.