1.创建路由表:根据EdgeRDD,将每个分区用map函数转换为RoutingTableMessage的一条消息:
消息tuple的结构为:<vid, Int>
vid代表点ID, int 前0~30位表示边分区的ID,后面31~32表示是否为src/destId
2.根据路由表生成分区对象vertexPartitions。在新分区中,map分区中的每条数据,从RoutingTableMessage解出数据:vid, edge pid, isSrcId/isDstId。这个三个数据项重新封装到三个数据结构中:pid2vid,srcFlags,dstFlags
3.生成ShippableVertexPartition:上面routingTables, 重新封装路由表里的数据结构为:ShippableVertexPartition
4.创建VertexRDDImpl对象new VertexRDDImpl(vertexPartitions)
本文介绍了一种基于图计算的数据处理流程,包括创建路由表、生成分区对象vertexPartitions及ShippableVertexPartition等步骤。重点讲解了如何通过EdgeRDD转换为RoutingTableMessage,并最终形成VertexRDDImpl对象。
1231

被折叠的 条评论
为什么被折叠?



