Home > other >  How to implement two jump with GraphX neighbor number statistics
How to implement two jump with GraphX neighbor number statistics

Time:09-26

Second jump neighbor number: for most of the social relations, only jump to obtain the degree distribution is far from enough, another important indicator is the second jump neighbor number, for example, there is no secret the secret of the friends of friends in the App, transmission is wider, more abundant information, therefore, the second jump neighbor number statistics is an important index in graph examination, for the calculation of two jump neighbor, GraphX gave no ready-made interface, the need to design and development, the current use of the method is: first traversal, all point to the neighbor points spread a with their own ID, the news of the life value of 2; Second traversal, all messages will be received to the neighbor points forward again, life value is 1; Final statistics on all points, receives the life value is 1 ID, grouping and summary, all point to jump two neighbors,
Before it is worth noting that this calculation, needed a degree distribution will be the super node in the graph, don't jump into two neighbor number calculation, otherwise, the super node will spread in the first round after receiving the message and overflowing, at the same time they are involved in calculation, can affect the relationships with their neighbors for a single vertex, lead to can't get really effective two jump neighbor number,

I just contact the Spark, want to see some examples, hope everybody comments,

CodePudding user response:

Try to use their own methods, should be able to jump two: http://blog.csdn.net/xubo245/article/details/51308337
  • Related