public class DKGatherBatchFinalReceiver extends KeyedReceiver
batchDone, dataFlowOperation, destination, executor, finishedSources, isEmptySent, isFinalBatchReceiver, keyLimit, limitPerKey, messages, representSource, representSourceSet, sendQueue, thisSources
Constructor and Description |
---|
DKGatherBatchFinalReceiver(BulkReceiver receiver,
boolean srt,
int limitPerKey,
java.lang.String shuffleDir,
java.util.Comparator com,
boolean groupByKey) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkIfEmptyIsSent(int target)
checks if the Empty message was sent for this target and sends it if not sent and possible to
send.
|
protected boolean |
finishProgress(boolean needsFurtherProgress,
int target)
Performs the final steps of the progress method in 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
|
protected boolean |
sendToTarget(boolean needsFurtherProgress,
boolean sourcesFinished,
int target,
java.util.Queue<java.lang.Object> targetSendQueue)
Called from the progress method to perform the communication calls to send the queued messages
Since this is the disk based gather this method will save the values to disk
|
isAllQueuesEmpty, isComplete, isSourcesFinished, moveMessagesToSendQueue, moveMessageToSendQueue, offerMessage, onFinish, onMessage, progress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clean, close, onMessage
public DKGatherBatchFinalReceiver(BulkReceiver receiver, boolean srt, int limitPerKey, java.lang.String shuffleDir, java.util.Comparator com, boolean groupByKey)
public void init(Config cfg, DataFlowOperation op, java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> expectedIds)
MessageReceiver
target -> source tasks
init
in interface MessageReceiver
init
in class KeyedReceiver
expectedIds
- expected task idsprotected boolean sendToTarget(boolean needsFurtherProgress, boolean sourcesFinished, int target, java.util.Queue<java.lang.Object> targetSendQueue)
sendToTarget
in class KeyedReceiver
needsFurtherProgress
- current state of needsFurtherProgress valuesourcesFinished
- specifies if the sources have completedtarget
- the target(which is a source in this instance) from which the messages are senttargetSendQueue
- the data structure that contains all the message dataprotected boolean finishProgress(boolean needsFurtherProgress, int target)
finishProgress
in class KeyedReceiver
needsFurtherProgress
- current state of needsFurtherProgress valuetarget
- the target(which is a source in this instance) from which the messages are sentprotected boolean checkIfEmptyIsSent(int target)
checkIfEmptyIsSent
in class KeyedReceiver
target
- target for which the check is done