Github user thunterdb commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16483#discussion_r106529377
  
    --- Diff: graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala 
---
    @@ -353,9 +365,19 @@ object PageRank extends Logging {
             vertexProgram(id, attr, msgSum)
         }
     
    -    Pregel(pagerankGraph, initialMessage, activeDirection = 
EdgeDirection.Out)(
    +    val rankGraph = Pregel(pagerankGraph, initialMessage, activeDirection 
= EdgeDirection.Out)(
           vp, sendMessage, messageCombiner)
           .mapVertices((vid, attr) => attr._1)
    -  } // end of deltaPageRank
    +
    +    // If the graph has sinks (vertices with no outgoing edges) the sum of 
ranks will not be correct
    --- End diff --
    
    This is the same code as above, please factor it into a function.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to