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

    https://github.com/apache/spark/pull/15125#discussion_r100640256
  
    --- Diff: graphx/src/main/scala/org/apache/spark/graphx/Pregel.scala ---
    @@ -123,16 +127,25 @@ object Pregel extends Logging {
           s" but got ${maxIterations}")
     
         var g = graph.mapVertices((vid, vdata) => vprog(vid, vdata, 
initialMsg)).cache()
    +    val graphCheckpointer = new PeriodicGraphCheckpointer[VD, ED](
    +      checkpointInterval, graph.vertices.sparkContext)
    +    graphCheckpointer.update(g)
    +
         // compute the messages
    -    var messages = GraphXUtils.mapReduceTriplets(g, sendMsg, mergeMsg)
    +    var messages = GraphXUtils.mapReduceTriplets(g, sendMsg, 
mergeMsg).cache()
    +    val messageCheckpointer = new PeriodicRDDCheckpointer[(VertexId, A)](
    +      checkpointInterval, graph.vertices.sparkContext)
    +    messageCheckpointer.update(messages.asInstanceOf[RDD[(VertexId, A)]])
    --- End diff --
    
    Actually, for the sake of simplicity and consistency, I'm going to suggest 
we keep the checkpointer update calls but remove all `.cache()` calls. The 
`update` calls persist the underlying data, making the calls to `.cache()` 
unnecessary.


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