org.apache.tez.runtime.library.common.sort.impl.dflt
Class DefaultSorter
java.lang.Object
org.apache.tez.runtime.library.common.sort.impl.ExternalSorter
org.apache.tez.runtime.library.common.sort.impl.dflt.DefaultSorter
- All Implemented Interfaces:
- org.apache.hadoop.util.IndexedSortable
public class DefaultSorter
- extends ExternalSorter
- implements org.apache.hadoop.util.IndexedSortable
| Fields inherited from class org.apache.tez.runtime.library.common.sort.impl.ExternalSorter |
additionalSpillBytesRead, additionalSpillBytesWritten, availableMemoryMb, codec, combiner, comparator, conf, fileOutputByteCounter, ifileBufferSize, ifileReadAhead, ifileReadAheadLength, keyClass, keySerializer, mapOutputByteCounter, mapOutputFile, mapOutputRecordCounter, nullProgressable, numAdditionalSpills, outputBytesWithOverheadCounter, outputContext, partitioner, partitions, rfs, serializationFactory, sorter, spilledRecordsCounter, valClass, valSerializer |
|
Constructor Summary |
DefaultSorter(org.apache.tez.runtime.api.TezOutputContext outputContext,
org.apache.hadoop.conf.Configuration conf,
int numOutputs,
long initialMemoryAvailable)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAP_OUTPUT_INDEX_RECORD_LENGTH
public static final int MAP_OUTPUT_INDEX_RECORD_LENGTH
- The size of each record in the index file for the map-outputs.
- See Also:
- Constant Field Values
VALSTART
protected static final int VALSTART
- See Also:
- Constant Field Values
KEYSTART
protected static final int KEYSTART
- See Also:
- Constant Field Values
PARTITION
protected static final int PARTITION
- See Also:
- Constant Field Values
VALLEN
protected static final int VALLEN
- See Also:
- Constant Field Values
NMETA
protected static final int NMETA
- See Also:
- Constant Field Values
METASIZE
protected static final int METASIZE
- See Also:
- Constant Field Values
DefaultSorter
public DefaultSorter(org.apache.tez.runtime.api.TezOutputContext outputContext,
org.apache.hadoop.conf.Configuration conf,
int numOutputs,
long initialMemoryAvailable)
throws IOException
- Throws:
IOException
write
public void write(Object key,
Object value)
throws IOException
- Specified by:
write in class ExternalSorter
- Throws:
IOException
compare
public int compare(int mi,
int mj)
- Compare logical range, st i, j MOD offset capacity.
Compare by partition, then by key.
- Specified by:
compare in interface org.apache.hadoop.util.IndexedSortable
- See Also:
IndexedSortable.compare(int, int)
swap
public void swap(int mi,
int mj)
- Swap metadata for items i,j
- Specified by:
swap in interface org.apache.hadoop.util.IndexedSortable
- See Also:
IndexedSortable.swap(int, int)
flush
public void flush()
throws IOException
- Specified by:
flush in class ExternalSorter
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in class ExternalSorter
- Throws:
IOException
sortAndSpill
protected void sortAndSpill()
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
spill
protected void spill(int mstart,
int mend)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
getInMemVBytesLength
protected int getInMemVBytesLength(int kvoff)
Copyright © 2014 Apache Software Foundation. All rights reserved.