Apache REEF  0.16.0
Retainable Evaluator Execution Framework
Public Member Functions | List of all members
Org.Apache.REEF.Network.Group.Task.Impl.OperatorTopology< T > Class Template Reference

Contains the Operator's topology graph. More...

Inherits Org.Apache.REEF.Network.Group.Task.IOperatorTopology< T >.

Public Member Functions

void Initialize (CancellationTokenSource cancellationSource)
 Initializes operator topology. More...
 
void SendToParent (T message, MessageType type)
 Sends the message to the parent Task. More...
 
void SendToChildren (T message, MessageType type)
 Sends the message to all child Tasks. More...
 
void ScatterToChildren (IList< T > messages, MessageType type)
 Splits the list of messages up evenly and sends each sublist to the child Tasks. More...
 
void ScatterToChildren (IList< T > messages, int count, MessageType type)
 Splits the list of messages up into chunks of the specified size and sends each sublist to the child Tasks. More...
 
void ScatterToChildren (IList< T > messages, List< string > order, MessageType type)
 Splits the list of messages up into chunks of the specified size and sends each sublist to the child Tasks in the specified order. More...
 
ReceiveFromParent (CancellationTokenSource cancellationSource=null)
 Receive an incoming message from the parent Task. More...
 
IList< T > ReceiveListFromParent (CancellationTokenSource cancellationSource=null)
 Receive a list of incoming messages from the parent Task. More...
 
ReceiveFromChildren (IReduceFunction< T > reduceFunction, CancellationTokenSource cancellationSource=null)
 Receives all messages from child Tasks and reduces them with the given IReduceFunction. More...
 
bool HasChildren ()
 Checks if the node has children More...
 

Detailed Description

Contains the Operator's topology graph.

Writable version Used to send or receive messages to/from operators in the same Communication Group.

Template Parameters
TThe message type

Member Function Documentation

◆ HasChildren()

Checks if the node has children

Returns
true if children are there, false otherwise

Implements Org.Apache.REEF.Network.Group.Task.IOperatorTopology< T >.

◆ Initialize()

void Org.Apache.REEF.Network.Group.Task.Impl.OperatorTopology< T >.Initialize ( CancellationTokenSource  cancellationSource)
inline

Initializes operator topology.

Waits until all Tasks in the CommunicationGroup have registered themselves with the Name Service.

Implements Org.Apache.REEF.Network.Group.Task.IOperatorTopology< T >.

◆ ReceiveFromChildren()

T Org.Apache.REEF.Network.Group.Task.Impl.OperatorTopology< T >.ReceiveFromChildren ( IReduceFunction< T >  reduceFunction,
CancellationTokenSource  cancellationSource = null 
)
inline

Receives all messages from child Tasks and reduces them with the given IReduceFunction.

Parameters
reduceFunctionThe class used to reduce messages
cancellationSourceThe cancellation token for the data reading operation cancellation
Returns
The result of reducing messages

Implements Org.Apache.REEF.Network.Group.Task.IOperatorTopology< T >.

◆ ReceiveFromParent()

T Org.Apache.REEF.Network.Group.Task.Impl.OperatorTopology< T >.ReceiveFromParent ( CancellationTokenSource  cancellationSource = null)
inline

Receive an incoming message from the parent Task.

Parameters
cancellationSourceThe cancellation token for the data reading operation cancellation
Returns
The parent Task's message

Implements Org.Apache.REEF.Network.Group.Task.IOperatorTopology< T >.

◆ ReceiveListFromParent()

IList<T> Org.Apache.REEF.Network.Group.Task.Impl.OperatorTopology< T >.ReceiveListFromParent ( CancellationTokenSource  cancellationSource = null)
inline

Receive a list of incoming messages from the parent Task.

Parameters
cancellationSourceThe cancellation token for the data reading operation cancellation
Returns

Implements Org.Apache.REEF.Network.Group.Task.IOperatorTopology< T >.

◆ ScatterToChildren() [1/3]

void Org.Apache.REEF.Network.Group.Task.Impl.OperatorTopology< T >.ScatterToChildren ( IList< T >  messages,
MessageType  type 
)
inline

Splits the list of messages up evenly and sends each sublist to the child Tasks.

Parameters
messagesThe list of messages to scatter
typeThe message type

Implements Org.Apache.REEF.Network.Group.Task.IOperatorTopology< T >.

◆ ScatterToChildren() [2/3]

void Org.Apache.REEF.Network.Group.Task.Impl.OperatorTopology< T >.ScatterToChildren ( IList< T >  messages,
int  count,
MessageType  type 
)
inline

Splits the list of messages up into chunks of the specified size and sends each sublist to the child Tasks.

Parameters
messagesThe list of messages to scatter
countThe size of each sublist
typeThe message type

Implements Org.Apache.REEF.Network.Group.Task.IOperatorTopology< T >.

◆ ScatterToChildren() [3/3]

void Org.Apache.REEF.Network.Group.Task.Impl.OperatorTopology< T >.ScatterToChildren ( IList< T >  messages,
List< string >  order,
MessageType  type 
)
inline

Splits the list of messages up into chunks of the specified size and sends each sublist to the child Tasks in the specified order.

Parameters
messagesThe list of messages to scatter
orderThe order to send messages
typeThe message type

Implements Org.Apache.REEF.Network.Group.Task.IOperatorTopology< T >.

◆ SendToChildren()

void Org.Apache.REEF.Network.Group.Task.Impl.OperatorTopology< T >.SendToChildren ( message,
MessageType  type 
)
inline

Sends the message to all child Tasks.

Parameters
messageThe message to send
typeThe message type

Implements Org.Apache.REEF.Network.Group.Task.IOperatorTopology< T >.

◆ SendToParent()

void Org.Apache.REEF.Network.Group.Task.Impl.OperatorTopology< T >.SendToParent ( message,
MessageType  type 
)
inline

Sends the message to the parent Task.

Parameters
messageThe message to send
typeThe message type

Implements Org.Apache.REEF.Network.Group.Task.IOperatorTopology< T >.


The documentation for this class was generated from the following file: