Skip to content

Commit d64e8d4

Browse files
committed
Log current Pregel iteration
1 parent aa77f8a commit d64e8d4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

graphx/src/main/scala/org/apache/spark/graphx/Pregel.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.apache.spark.graphx
1919

2020
import scala.reflect.ClassTag
21+
import org.apache.spark.Logging
2122

2223

2324
/**
@@ -52,7 +53,7 @@ import scala.reflect.ClassTag
5253
* }}}
5354
*
5455
*/
55-
object Pregel {
56+
object Pregel extends Logging {
5657

5758
/**
5859
* Execute a Pregel-like iterative vertex-parallel abstraction. The
@@ -142,6 +143,9 @@ object Pregel {
142143
// hides oldMessages (depended on by newVerts), newVerts (depended on by messages), and the
143144
// vertices of prevG (depended on by newVerts, oldMessages, and the vertices of g).
144145
activeMessages = messages.count()
146+
147+
logInfo("Pregel finished iteration " + i)
148+
145149
// Unpersist the RDDs hidden by newly-materialized RDDs
146150
oldMessages.unpersist(blocking=false)
147151
newVerts.unpersist(blocking=false)

0 commit comments

Comments
 (0)