public abstract class ExternalSorter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ExternalSorter.MapBufferTooSmallException
Exception indicating that the allocated sort buffer is insufficient to hold
the current record.
|
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.tez.common.counters.TezCounter |
additionalSpillBytesRead |
protected org.apache.tez.common.counters.TezCounter |
additionalSpillBytesWritten |
protected long |
availableMemoryMb |
protected org.apache.hadoop.io.compress.CompressionCodec |
codec |
protected Combiner |
combiner |
protected org.apache.hadoop.io.RawComparator |
comparator |
protected org.apache.hadoop.conf.Configuration |
conf |
protected org.apache.tez.common.counters.TezCounter |
fileOutputByteCounter |
protected org.apache.hadoop.fs.Path |
finalIndexFile |
protected org.apache.hadoop.fs.Path |
finalOutputFile |
protected int |
ifileBufferSize |
protected boolean |
ifileReadAhead |
protected int |
ifileReadAheadLength |
protected Class |
keyClass |
protected org.apache.hadoop.io.serializer.Serializer |
keySerializer |
protected org.apache.tez.common.counters.TezCounter |
mapOutputByteCounter |
protected TezTaskOutput |
mapOutputFile |
protected org.apache.tez.common.counters.TezCounter |
mapOutputRecordCounter |
protected org.apache.hadoop.util.Progressable |
nullProgressable |
protected org.apache.tez.common.counters.TezCounter |
numAdditionalSpills |
protected int |
numSpills |
protected org.apache.tez.common.counters.TezCounter |
outputBytesWithOverheadCounter |
protected org.apache.tez.runtime.api.OutputContext |
outputContext |
protected Partitioner |
partitioner |
protected int |
partitions |
protected org.apache.hadoop.fs.FileSystem |
rfs |
protected org.apache.hadoop.io.serializer.SerializationFactory |
serializationFactory |
protected org.apache.hadoop.util.IndexedSorter |
sorter |
protected org.apache.tez.common.counters.TezCounter |
spilledRecordsCounter |
protected Map<Integer,org.apache.hadoop.fs.Path> |
spillFileIndexPaths |
protected Map<Integer,org.apache.hadoop.fs.Path> |
spillFilePaths |
protected Class |
valClass |
protected org.apache.hadoop.io.serializer.Serializer |
valSerializer |
| Constructor and Description |
|---|
ExternalSorter(org.apache.tez.runtime.api.OutputContext outputContext,
org.apache.hadoop.conf.Configuration conf,
int numOutputs,
long initialMemoryAvailable) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
abstract void |
flush() |
org.apache.hadoop.fs.Path |
getFinalIndexFile() |
org.apache.hadoop.fs.Path |
getFinalOutputFile() |
static long |
getInitialMemoryRequirement(org.apache.hadoop.conf.Configuration conf,
long maxAvailableTaskMemory) |
TezTaskOutput |
getMapOutput() |
int |
getNumSpills() |
ShuffleHeader |
getShuffleHeader(int reduce) |
InputStream |
getSortedStream(int partition) |
protected void |
runCombineProcessor(TezRawKeyValueIterator kvIter,
IFile.Writer writer) |
protected void |
sameVolRename(org.apache.hadoop.fs.Path srcPath,
org.apache.hadoop.fs.Path dstPath)
Rename srcPath to dstPath on the same volume.
|
void |
write(Object key,
Iterable<Object> values) |
abstract void |
write(Object key,
Object value) |
protected final org.apache.hadoop.util.Progressable nullProgressable
protected final org.apache.tez.runtime.api.OutputContext outputContext
protected final Combiner combiner
protected final Partitioner partitioner
protected final org.apache.hadoop.conf.Configuration conf
protected final org.apache.hadoop.fs.FileSystem rfs
protected final TezTaskOutput mapOutputFile
protected final int partitions
protected final Class keyClass
protected final Class valClass
protected final org.apache.hadoop.io.RawComparator comparator
protected final org.apache.hadoop.io.serializer.SerializationFactory serializationFactory
protected final org.apache.hadoop.io.serializer.Serializer keySerializer
protected final org.apache.hadoop.io.serializer.Serializer valSerializer
protected final boolean ifileReadAhead
protected final int ifileReadAheadLength
protected final int ifileBufferSize
protected final long availableMemoryMb
protected final org.apache.hadoop.util.IndexedSorter sorter
protected final org.apache.hadoop.io.compress.CompressionCodec codec
protected org.apache.hadoop.fs.Path finalOutputFile
protected org.apache.hadoop.fs.Path finalIndexFile
protected int numSpills
protected final org.apache.tez.common.counters.TezCounter mapOutputByteCounter
protected final org.apache.tez.common.counters.TezCounter mapOutputRecordCounter
protected final org.apache.tez.common.counters.TezCounter outputBytesWithOverheadCounter
protected final org.apache.tez.common.counters.TezCounter fileOutputByteCounter
protected final org.apache.tez.common.counters.TezCounter spilledRecordsCounter
protected final org.apache.tez.common.counters.TezCounter additionalSpillBytesWritten
protected final org.apache.tez.common.counters.TezCounter additionalSpillBytesRead
protected final org.apache.tez.common.counters.TezCounter numAdditionalSpills
public ExternalSorter(org.apache.tez.runtime.api.OutputContext outputContext,
org.apache.hadoop.conf.Configuration conf,
int numOutputs,
long initialMemoryAvailable)
throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic abstract void flush()
throws IOException
IOExceptionpublic abstract void write(Object key, Object value) throws IOException
IOExceptionpublic void write(Object key, Iterable<Object> values) throws IOException
IOException@InterfaceAudience.Private public TezTaskOutput getMapOutput()
@InterfaceAudience.Private public org.apache.hadoop.fs.Path getFinalIndexFile()
public org.apache.hadoop.fs.Path getFinalOutputFile()
protected void runCombineProcessor(TezRawKeyValueIterator kvIter, IFile.Writer writer) throws IOException
IOExceptionprotected void sameVolRename(org.apache.hadoop.fs.Path srcPath,
org.apache.hadoop.fs.Path dstPath)
throws IOException
IOExceptionpublic InputStream getSortedStream(int partition)
public ShuffleHeader getShuffleHeader(int reduce)
public static long getInitialMemoryRequirement(org.apache.hadoop.conf.Configuration conf,
long maxAvailableTaskMemory)
public int getNumSpills()
Copyright © 2015 Apache Software Foundation. All rights reserved.