public interface Shuffle
Modifier and Type | Method and Description |
---|---|
default void |
add(byte[] data,
int length)
Add object
|
default void |
add(java.lang.Object key,
byte[] data,
int length)
Add an object with a key
|
default void |
add(Tuple tuple)
Add tuple with byte value and key
|
default void |
clean()
Clean the file system
|
java.util.Iterator<java.lang.Object> |
readIterator()
Get a read iterator
|
default void |
run()
Execute the shuffle operation.
|
void |
switchToReading()
Switch to reading, we cannot add after this
|
void switchToReading()
java.util.Iterator<java.lang.Object> readIterator()
default void add(Tuple tuple)
tuple
- tupledefault void add(java.lang.Object key, byte[] data, int length)
key
- the object keydata
- the datalength
- length of the datadefault void add(byte[] data, int length)
data
- the data as byteslength
- the length of datadefault void run()
default void clean()