Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix in sendMessage() of pregel implementation in PageRank.scala #20899

Closed
wants to merge 1 commit into from

Conversation

mangolzy
Copy link

What changes were proposed in this pull request?

Iterator((edge.dstId, edge.srcAttr._2 * edge.attr))
->
Iterator((edge.dstId, edge.srcAttr._1 * edge.attr))

How was this patch tested?

Since edge.srcAttr._2 is used to compare with tol, it should be the (newPR - oldPR), but in the sendMessage, the origin code send it as part of the message, instead it should be the newPR which is edge.srcAttr._1.

Please review http://spark.apache.org/contributing.html before opening a pull request.

Iterator((edge.dstId, edge.srcAttr._2 * edge.attr))
->
Iterator((edge.dstId, edge.srcAttr._1 * edge.attr))

Since edge.srcAttr._2 is used to compare with tol, it should be the (newPR - oldPR), but in the sendMessage, the origin code send it as part of the message, instead it should be the newPR which is edge.srcAttr._1.
@mangolzy mangolzy changed the title fix bug in sendMessage() of pregel implementation fix bug in sendMessage() of pregel implementation in PageRank.scala Mar 24, 2018
@mangolzy mangolzy changed the title fix bug in sendMessage() of pregel implementation in PageRank.scala Bug fix in sendMessage() of pregel implementation in PageRank.scala Mar 24, 2018
@WenqianZhao
Copy link

You can check the comment in pull request #2100.

@WenqianZhao
Copy link

By the way, @ankurdave , hi, I'm very curious about why you use delta instead of just newPR as the message. Is that for better performance or just at chance? Could you please answer this question when you are free? Thank you so much.

@ankurdave
Copy link
Contributor

ankurdave commented Oct 31, 2018

@WenqianZhao I think the point of sending deltas instead of absolute ranks was that, as parts of the graph converge, their deltas would go to zero. GraphX would then be able to compress those zero messages more efficiently.

@WenqianZhao
Copy link

@WenqianZhao I think the point of sending deltas instead of absolute ranks was that, as parts of the graph converge, their deltas would go to zero. GraphX would then be able to compress those zero messages more efficiently.

Got it! Thank you!

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@srowen srowen closed this Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants