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_r348000592
 
 

 ##########
 File path: 
graphx/src/test/scala/org/apache/spark/graphx/lib/PageRankSuite.scala
 ##########
 @@ -268,6 +338,24 @@ class PageRankSuite extends SparkFunSuite with 
LocalSparkContext {
     }
   }
 
+  test("Loop with source PageRank with checkpoint") {
+    withSpark { sc =>
+      val edges = sc.parallelize((1L, 2L) :: (2L, 3L) :: (3L, 4L) :: (4L, 2L) 
:: Nil)
+      val g = Graph.fromEdgeTuples(edges, 1)
+      val resetProb = 0.15
+      val tol = 0.0001
+      val errorTol = 1.0e-5
+
+      val (iterAfterHalfCheckPoint, totalIters) =
+        convergenceIterations(g, resetProb, tol, errorTol)
+
+      // In this case checkPoint helps a lot
+      assert(totalIters == 34)
+      assert(iterAfterHalfCheckPoint == 17)
+
 
 Review comment:
   Nit: remove blank lines like this

----------------------------------------------------------------
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