public class DPartitionBatchFinalReceiver extends java.lang.Object implements MessageReceiver
| Modifier and Type | Field and Description |
|---|---|
protected <any> |
targetStates
Keep state about the targets
|
| Constructor and Description |
|---|
DPartitionBatchFinalReceiver(BulkReceiver receiver,
java.util.List<java.lang.String> shuffleDirs,
java.util.Comparator<java.lang.Object> com,
boolean groupByKey) |
| Modifier and Type | Method and Description |
|---|---|
void |
clean()
Clean any state associated with the receiver and go to initial state
|
void |
close()
Close the receiver
|
void |
init(Config cfg,
DataFlowOperation op,
java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> expectedIds)
Initialize the message receiver with tasks from which messages are expected
For each sub edge in graph, for each path, gives the expected task ids
|
boolean |
isComplete()
Weather we are complete a set of messages
|
boolean |
onMessage(int source,
int path,
int target,
int flags,
java.lang.Object object)
The actual message callback
|
boolean |
progress()
This method will be called by the communicationProgress
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonMessagepublic DPartitionBatchFinalReceiver(BulkReceiver receiver, java.util.List<java.lang.String> shuffleDirs, java.util.Comparator<java.lang.Object> com, boolean groupByKey)
public void init(Config cfg, DataFlowOperation op, java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> expectedIds)
MessageReceivertarget -> source tasks
init in interface MessageReceiverexpectedIds - expected task idspublic boolean onMessage(int source,
int path,
int target,
int flags,
java.lang.Object object)
MessageReceiveronMessage in interface MessageReceiversource - the source taskpath - the path that is taken by the message, that is intermediate targetstarget - the target of this receiverflags - the communication flagsobject - the actual messagepublic boolean progress()
MessageReceiverprogress in interface MessageReceiverpublic boolean isComplete()
MessageReceiverisComplete in interface MessageReceiverpublic void close()
MessageReceiverclose in interface MessageReceiverpublic void clean()
MessageReceiverclean in interface MessageReceiver