public class TreeBroadcast extends java.lang.Object implements DataFlowOperation, ChannelReceiver
| Constructor and Description |
|---|
TreeBroadcast(TWSChannel channel,
int src,
java.util.Set<java.lang.Integer> dests,
MessageReceiver finalRcvr,
MessageSchema messageSchema) |
TreeBroadcast(TWSChannel channel,
int src,
java.util.Set<java.lang.Integer> dests,
MessageReceiver finalRcvr,
MessageType keyType,
MessageType dataType,
MessageSchema messageSchema) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the operation
|
void |
finish(int target)
If this is a larger transfer of dataflow style, we need to finish
|
LogicalPlan |
getLogicalPlan()
Task plan associated with this operation
|
java.util.Set<java.lang.Integer> |
getSources()
Get the sources of the operation
|
java.util.Set<java.lang.Integer> |
getTargets()
Get targets of operation
|
java.lang.String |
getUniqueId()
Returns a unique id for this operation.
|
boolean |
handleReceivedChannelMessage(ChannelMessage currentMessage)
Handle a partially received buffers
|
void |
init(Config cfg,
MessageType dType,
LogicalPlan tPlan,
int ed)
Initialize
|
void |
init(Config cfg,
MessageType dType,
MessageType recvDType,
LogicalPlan tPlan,
int ed) |
void |
init(Config cfg,
MessageType dType,
MessageType recvDType,
MessageType kType,
MessageType recvKType,
LogicalPlan tPlan,
int ed)
Initialize
|
boolean |
isComplete()
Weather the operation doesn't have any pending sends or receives
|
boolean |
isDelegateComplete() |
boolean |
progress()
Progress the pending dataflow operations
|
java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> |
receiveExpectedTaskIds() |
boolean |
receiveMessage(MessageHeader h,
java.lang.Object o)
Receive a fully built message
|
boolean |
receiveSendInternally(int src,
int target,
int path,
int flags,
java.lang.Object message)
For partial receives the path and
|
protected java.util.Set<java.lang.Integer> |
receivingExecutors() |
void |
reset()
Reset and get the operation to initial state
|
boolean |
send(int src,
java.lang.Object message,
int flags)
Send a send message, this call will work asynchronously
|
boolean |
send(int src,
java.lang.Object message,
int flags,
int target)
Send the message on a specific path
|
boolean |
sendPartial(int src,
java.lang.Object message,
int flags)
Use this to inject partial results in a distributed dataflow operation
|
boolean |
sendPartial(int src,
java.lang.Object message,
int flags,
int target)
Send partial message on a specific path
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDataType, getKeyType, getReceiveDataType, getReceiveKeyTypesendCompletedpublic TreeBroadcast(TWSChannel channel, int src, java.util.Set<java.lang.Integer> dests, MessageReceiver finalRcvr, MessageType keyType, MessageType dataType, MessageSchema messageSchema)
public TreeBroadcast(TWSChannel channel, int src, java.util.Set<java.lang.Integer> dests, MessageReceiver finalRcvr, MessageSchema messageSchema)
public void close()
DataFlowOperationclose in interface DataFlowOperationpublic void reset()
DataFlowOperationreset in interface DataFlowOperationpublic void finish(int target)
DataFlowOperationfinish in interface DataFlowOperationpublic LogicalPlan getLogicalPlan()
DataFlowOperationgetLogicalPlan in interface DataFlowOperationpublic java.lang.String getUniqueId()
DataFlowOperationgetUniqueId in interface DataFlowOperationpublic boolean receiveMessage(MessageHeader h, java.lang.Object o)
ChannelReceiverreceiveMessage in interface ChannelReceiverh - the headero - the built messagepublic void init(Config cfg, MessageType dType, MessageType recvDType, MessageType kType, MessageType recvKType, LogicalPlan tPlan, int ed)
public void init(Config cfg, MessageType dType, MessageType recvDType, LogicalPlan tPlan, int ed)
public void init(Config cfg, MessageType dType, LogicalPlan tPlan, int ed)
public boolean sendPartial(int src,
java.lang.Object message,
int flags)
DataFlowOperationsendPartial in interface DataFlowOperationmessage - messagepublic boolean isComplete()
DataFlowOperationisComplete in interface DataFlowOperationpublic boolean send(int src,
java.lang.Object message,
int flags)
DataFlowOperationsend in interface DataFlowOperationsrc - source taskmessage - message as a generic objectpublic boolean send(int src,
java.lang.Object message,
int flags,
int target)
DataFlowOperationsend in interface DataFlowOperationsrc - source taskmessage - a generic java objecttarget - target taskpublic boolean sendPartial(int src,
java.lang.Object message,
int flags,
int target)
DataFlowOperationsendPartial in interface DataFlowOperationsrc - the sourcemessage - message as a generic objecttarget - the final targetpublic boolean progress()
DataFlowOperationprogress in interface DataFlowOperationpublic boolean isDelegateComplete()
isDelegateComplete in interface DataFlowOperationpublic boolean handleReceivedChannelMessage(ChannelMessage currentMessage)
ChannelReceiverhandleReceivedChannelMessage in interface ChannelReceivercurrentMessage - the messagepublic boolean receiveSendInternally(int src,
int target,
int path,
int flags,
java.lang.Object message)
ChannelReceiverreceiveSendInternally in interface ChannelReceiversrc - the sourcetarget - target to be sentpath - the path to be usedflags - flagsmessage - messageprotected java.util.Set<java.lang.Integer> receivingExecutors()
public java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> receiveExpectedTaskIds()
public java.util.Set<java.lang.Integer> getSources()
DataFlowOperationgetSources in interface DataFlowOperationpublic java.util.Set<java.lang.Integer> getTargets()
DataFlowOperationgetTargets in interface DataFlowOperation