public class MapRFsOutputBuffer<K,V> extends Object implements org.apache.hadoop.mapred.MapOutputCollector<K,V>, org.apache.hadoop.util.IndexedSortable
Modifier and Type | Class and Description |
---|---|
protected class |
MapRFsOutputBuffer.BlockingBuffer
Inner class managing the spill of serialized records to disk.
|
class |
MapRFsOutputBuffer.Buffer |
protected class |
MapRFsOutputBuffer.InMemValBytes
Inner class wrapping valuebytes, used for appendRaw.
|
Constructor and Description |
---|
MapRFsOutputBuffer() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
collect(K key,
V value,
int partition)
Serialize the key, value to intermediate storage.
|
int |
compare(int mi,
int mj)
Compare logical range, st i, j MOD offset capacity.
|
void |
flush() |
void |
init(org.apache.hadoop.mapred.MapOutputCollector.Context context) |
protected void |
mergeParts() |
protected void |
sortAndSpill() |
protected boolean |
sortAndSpillWrapper() |
void |
swap(int mi,
int mj)
Swap metadata for items i, j
|
public void init(org.apache.hadoop.mapred.MapOutputCollector.Context context) throws IOException, ClassNotFoundException
init
in interface org.apache.hadoop.mapred.MapOutputCollector<K,V>
IOException
ClassNotFoundException
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 close()
protected boolean sortAndSpillWrapper() throws IOException, ClassNotFoundException, InterruptedException
protected void sortAndSpill() throws IOException, ClassNotFoundException, InterruptedException
protected void mergeParts() throws IOException, InterruptedException, ClassNotFoundException
public void collect(K key, V value, int partition) throws IOException
collect
in interface org.apache.hadoop.mapred.MapOutputCollector<K,V>
IOException
public void flush() throws IOException, ClassNotFoundException, InterruptedException
flush
in interface org.apache.hadoop.mapred.MapOutputCollector<K,V>
IOException
ClassNotFoundException
InterruptedException
Copyright © 2019 Apache Software Foundation. All Rights Reserved.