public class GatherBatchFinalReceiver extends BaseGatherBatchReceiver
gatheredValuesMap, LOG
barriers, destination, isSyncSent, messages, operation, sendPendingMax, sourcesOfTarget, syncReceived, syncState, targetStates, workerId
Constructor and Description |
---|
GatherBatchFinalReceiver(BulkReceiver bulkReceiver)
Constructs the gather batch final receiver
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
handleMessage(int task,
java.lang.Object message,
int flags,
int dest) |
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 |
isFilledToSend(int target,
boolean sync)
Return true if we are filled to send
|
void |
onSyncEvent(int target,
byte[] value)
This method is called when there is a sync event on the operation
|
protected boolean |
sendSyncForward(int target)
Handle the sync
|
aggregate, isAllEmpty, sendToTarget
allQueuesEmpty, allSyncsPresent, clean, isComplete, onFinish, onMessage, progress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, onMessage
public GatherBatchFinalReceiver(BulkReceiver bulkReceiver)
bulkReceiver
- the receiverpublic 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 BaseGatherBatchReceiver
expectedIds
- expected task idsprotected boolean handleMessage(int task, java.lang.Object message, int flags, int dest)
handleMessage
in class BaseGatherBatchReceiver
protected boolean sendSyncForward(int target)
SourceReceiver
sendSyncForward
in class SourceReceiver
target
- targetprotected boolean isFilledToSend(int target, boolean sync)
SourceReceiver
isFilledToSend
in class SourceReceiver
public void onSyncEvent(int target, byte[] value)
SourceReceiver
onSyncEvent
in class BaseGatherBatchReceiver
target
- the target to which the sync event belongvalue
- the byte value, can be null