spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cornell <corn...@cs.umass.edu>
Subject GraphX pregel: getting the current iteration number
Date Tue, 03 Feb 2015 18:20:58 GMT
Hi Folks,

I'm new to GraphX and Scala and my sendMsg function needs to index into an input list to my
algorithm based on the pregel()() iteration number, but I don't see a way to access that.
I see in https://github.com/apache/spark/blob/master/graphx/src/main/scala/org/apache/spark/graphx/Pregel.scala
that it's just an index variable "i" in a while loop, but is there a way for sendMsg to access
within the loop's scope? I don't think so, so barring that, given Scala's functional stateless
nature, what other approaches would you take to do this? I'm considering a closure, but a
var that gets updated by all the sendMsgs seems a recipe for trouble.

Thank you,

matt
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message