July 2017
Intermediate to advanced
796 pages
18h 55m
English
The core aggregation operation in GraphX is aggregateMessages, which applies a user-defined sendMsg function to each edge triplet in the graph and then uses the mergeMsg function to aggregate these messages at their destination vertex. aggregateMessages is used in many graph algorithms, where we have to exchange information between vertices.
The following is the signature for this API:
def aggregateMessages[Msg: ClassTag]( sendMsg: EdgeContext[VD, ED, Msg] => Unit, mergeMsg: (Msg, Msg) => Msg, tripletFields: TripletFields = TripletFields.All) : VertexRDD[Msg]
The key functions are the sendMsg and mergeMsg, which determine what gets sent either to source vertex or destination vertex of an edge. Then, mergeMsg processes the ...
Read now
Unlock full access