public final class DefaultSorter extends ExternalSorter implements org.apache.hadoop.util.IndexedSortable
Modifier and Type | Class and Description |
---|---|
protected class |
DefaultSorter.BlockingBuffer
Inner class managing the spill of serialized records to disk.
|
class |
DefaultSorter.Buffer |
protected class |
DefaultSorter.MRResultIterator |
protected class |
DefaultSorter.SpillThread |
ExternalSorter.MapBufferTooSmallException
Modifier and Type | Field and Description |
---|---|
protected static int |
KEYSTART |
static int |
MAP_OUTPUT_INDEX_RECORD_LENGTH
The size of each record in the index file for the map-outputs.
|
static int |
MAX_IO_SORT_MB |
protected static int |
METASIZE |
protected static int |
NMETA |
protected static int |
PARTITION |
protected static int |
VALLEN |
protected static int |
VALSTART |
additionalSpillBytesRead, additionalSpillBytesWritten, availableMemoryMb, cleanup, codec, combiner, comparator, conf, fileOutputByteCounter, finalIndexFile, finalMergeEnabled, finalOutputFile, ifileBufferSize, ifileReadAhead, ifileReadAheadLength, keyClass, keySerializer, mapOutputByteCounter, mapOutputFile, mapOutputRecordCounter, numAdditionalSpills, numShuffleChunks, numSpills, outputBytesWithOverheadCounter, outputContext, partitioner, partitions, partitionStats, progressable, rfs, sendEmptyPartitionDetails, serializationFactory, sorter, spilledRecordsCounter, spillFileIndexPaths, spillFilePaths, statsReporter, valClass, valSerializer
Constructor and Description |
---|
DefaultSorter(org.apache.tez.runtime.api.OutputContext outputContext,
org.apache.hadoop.conf.Configuration conf,
int numOutputs,
long initialMemoryAvailable) |
Modifier and Type | Method and Description |
---|---|
int |
compare(int mi,
int mj)
Compare logical range, st i, j MOD offset capacity.
|
void |
flush() |
protected int |
getInMemVBytesLength(int kvoff) |
protected void |
sortAndSpill(long sameKeyCount,
long totalKeysCount) |
protected void |
spill(int mstart,
int mend,
long sameKeyCount,
long totalKeysCount) |
void |
swap(int mi,
int mj)
Swap metadata for items i,j
|
void |
write(Object key,
Object value) |
cleanup, cleanup, cleanup, close, getFinalIndexFile, getFinalOutputFile, getInitialMemoryRequirement, getMapOutput, getNumSpills, getPartitionStats, getShuffleHeader, getSortedStream, isFinalMergeEnabled, reportPartitionStats, reportStatistics, runCombineProcessor, sameVolRename, write
public static final int MAP_OUTPUT_INDEX_RECORD_LENGTH
protected static final int VALSTART
protected static final int KEYSTART
protected static final int PARTITION
protected static final int VALLEN
protected static final int NMETA
protected static final int METASIZE
public static final int MAX_IO_SORT_MB
public DefaultSorter(org.apache.tez.runtime.api.OutputContext outputContext, org.apache.hadoop.conf.Configuration conf, int numOutputs, long initialMemoryAvailable) throws IOException
IOException
public void write(Object key, Object value) throws IOException
write
in class ExternalSorter
IOException
public int compare(int mi, int mj)
compare
in interface org.apache.hadoop.util.IndexedSortable
IndexedSortable.compare(int, int)
public void swap(int mi, int mj)
swap
in interface org.apache.hadoop.util.IndexedSortable
IndexedSortable.swap(int, int)
public void flush() throws IOException
flush
in class ExternalSorter
IOException
protected void sortAndSpill(long sameKeyCount, long totalKeysCount) throws IOException, InterruptedException
IOException
InterruptedException
protected void spill(int mstart, int mend, long sameKeyCount, long totalKeysCount) throws IOException, InterruptedException
IOException
InterruptedException
protected int getInMemVBytesLength(int kvoff)
Copyright © 2016 Apache Software Foundation. All rights reserved.