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, progressclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclean, close, onMessagepublic 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)
MessageReceivertarget -> source tasks
init in interface MessageReceiverinit in class KeyedReceiverexpectedIds - expected task idsprotected boolean sendToTarget(boolean needsFurtherProgress,
boolean sourcesFinished,
int target,
java.util.Queue<java.lang.Object> targetSendQueue)
sendToTarget in class KeyedReceiverneedsFurtherProgress - 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 KeyedReceiverneedsFurtherProgress - 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 KeyedReceivertarget - target for which the check is done