org.apache.hadoop.mapred
Class MapTask.MapOutputBuffer<K,V>
java.lang.Object
org.apache.hadoop.mapred.MapTask.MapOutputBuffer<K,V>
- All Implemented Interfaces:
- MapOutputCollector<K,V>, org.apache.hadoop.util.IndexedSortable
- Enclosing class:
- MapTask
@InterfaceAudience.LimitedPrivate(value="MapReduce")
@InterfaceStability.Unstable
public static class MapTask.MapOutputBuffer<K,V>
- extends java.lang.Object
- implements MapOutputCollector<K,V>, org.apache.hadoop.util.IndexedSortable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapTask.MapOutputBuffer
public MapTask.MapOutputBuffer()
init
public void init(MapOutputCollector.Context context)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
init
in interface MapOutputCollector<K,V>
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
collect
public void collect(K key,
V value,
int partition)
throws java.io.IOException
- Specified by:
collect
in interface MapOutputCollector<K,V>
- Throws:
java.io.IOException
compare
public int compare(int i,
int j)
- 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 i,
int j)
- Swap logical indices st i, j MOD offset capacity.
- Specified by:
swap
in interface org.apache.hadoop.util.IndexedSortable
- See Also:
IndexedSortable.swap(int, int)
flush
public void flush()
throws java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
- Specified by:
flush
in interface MapOutputCollector<K,V>
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InterruptedException
close
public void close()
- Specified by:
close
in interface MapOutputCollector<K,V>
Copyright © 2009 The Apache Software Foundation