Constructor and Description |
---|
FSKeyedMerger(long maxBytesInMemory,
long maxRecsInMemory,
java.lang.String dir,
java.lang.String opName,
MessageType kType,
MessageType dType) |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Object key,
byte[] data,
int length)
Add the data to the file
|
void |
add(Tuple tuple)
Add tuple with byte value and key
|
void |
clean()
Cleanup the directories
|
ResettableIterator<java.lang.Object> |
readIterator()
This method gives the values
|
void |
run()
This method saves the data to file system
|
void |
switchToReading()
Switch to reading, we cannot add after this
|
public FSKeyedMerger(long maxBytesInMemory, long maxRecsInMemory, java.lang.String dir, java.lang.String opName, MessageType kType, MessageType dType)
public void add(Tuple tuple)
Shuffle
public void add(java.lang.Object key, byte[] data, int length)
public void switchToReading()
Shuffle
switchToReading
in interface Shuffle
public void run()
public ResettableIterator<java.lang.Object> readIterator()
readIterator
in interface Shuffle