srowen commented on a change in pull request #26523: [SPARK-29877][GRAPHX] 
static PageRank allow checkPoint from previous computations
URL: https://github.com/apache/spark/pull/26523#discussion_r347999745
 
 

 ##########
 File path: graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala
 ##########
 @@ -119,46 +155,89 @@ object PageRank extends Logging {
     // When running personalized pagerank, only the source vertex
     // has an attribute 1.0. All others are set to 0.
     var rankGraph: Graph[Double, Double] = graph
-      // Associate the degree with each vertex
-      .outerJoinVertices(graph.outDegrees) { (vid, vdata, deg) => 
deg.getOrElse(0) }
-      // Set the weight on the edges based on the degree
-      .mapTriplets( e => 1.0 / e.srcAttr, TripletFields.Src )
-      // Set the vertex attributes to the initial pagerank values
-      .mapVertices { (id, attr) =>
-        if (!(id != src && personalized)) 1.0 else 0.0
-      }
-
-    def delta(u: VertexId, v: VertexId): Double = { if (u == v) 1.0 else 0.0 }
+          // Associate the degree with each vertex
 
 Review comment:
   Much of the change here is just formatting, but it seems to be a bit 
incorrect. This is indented too deeply for example. To make it easier to review 
can you undo any of the formatting or whitespace-only changes?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to