public class ReduceBatchFinalReceiver extends BaseReduceBatchFinalReceiver
reducedValueMap, reduceFunction
barriers, destination, isSyncSent, messages, operation, sendPendingMax, sourcesOfTarget, syncReceived, syncState, targetStates, workerId
Constructor and Description |
---|
ReduceBatchFinalReceiver(ReduceFunction reduce,
SingularReceiver receiver) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
handleFinished(int task,
java.lang.Object value)
Handle finish
|
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 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
|
handleMessage
aggregate, isAllEmpty, isFilledToSend, sendToTarget
allQueuesEmpty, allSyncsPresent, clean, isComplete, onFinish, onMessage, progress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, onMessage
public ReduceBatchFinalReceiver(ReduceFunction reduce, SingularReceiver receiver)
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 ReduceBatchReceiver
expectedIds
- expected task idsprotected boolean handleFinished(int task, java.lang.Object value)
BaseReduceBatchFinalReceiver
handleFinished
in class BaseReduceBatchFinalReceiver
task
- taskvalue
- valueprotected boolean sendSyncForward(int target)
SourceReceiver
sendSyncForward
in class SourceReceiver
target
- targetprotected void onSyncEvent(int target, byte[] value)
SourceReceiver
onSyncEvent
in class ReduceBatchReceiver
target
- the target to which the sync event belongvalue
- the byte value, can be null