In GraphX aggregateMessages API
class Graph[VD, ED] {
def aggregateMessages[Msg: ClassTag](
sendMsg: EdgeContext[VD, ED, Msg] => Unit,
mergeMsg: (Msg, Msg) => Msg,
tripletFields: TripletFields = TripletFields.All)
: VertexRDD[Msg]
}
However I want to modify the return type of merge stage which means I want something like combineByKey
instead of reduceByKey
, how can I do it based on the advantage of GraphX? Or in other words, how can I just use the result of sendMsg
and skip the mergeMsg
stage of this function?
The advantage of GraphX I mean is "vertex centric", if I use map
and combineByKey
function it will do global shuffling, which cost plenty of time, going against the idea "vertex centric"