diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-04-08 17:34:38 -0400 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-04-08 17:34:38 -0400 |
commit | adba773fab6294b5764d101d248815a7d3cb3558 (patch) | |
tree | 8bd4bb03abc86d9f50e0ef72b22b93cec8bf0f8f /bagel/src | |
parent | eed54a25d8124865608bf0c2bc8a1dc27958761c (diff) | |
download | spark-adba773fab6294b5764d101d248815a7d3cb3558.tar.gz spark-adba773fab6294b5764d101d248815a7d3cb3558.tar.bz2 spark-adba773fab6294b5764d101d248815a7d3cb3558.zip |
Fix passing of superstep in Bagel to avoid seeing new values of the
superstep value upon recomputation, and set the default storage level in
Bagel to MEMORY_AND_DISK
Diffstat (limited to 'bagel/src')
-rw-r--r-- | bagel/src/main/scala/spark/bagel/Bagel.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bagel/src/main/scala/spark/bagel/Bagel.scala b/bagel/src/main/scala/spark/bagel/Bagel.scala index e10c03f6ba..5ecdd7d004 100644 --- a/bagel/src/main/scala/spark/bagel/Bagel.scala +++ b/bagel/src/main/scala/spark/bagel/Bagel.scala @@ -7,8 +7,7 @@ import scala.collection.mutable.ArrayBuffer import storage.StorageLevel object Bagel extends Logging { - - val DEFAULT_STORAGE_LEVEL = StorageLevel.MEMORY_ONLY + val DEFAULT_STORAGE_LEVEL = StorageLevel.MEMORY_AND_DISK /** * Runs a Bagel program. @@ -63,8 +62,9 @@ object Bagel extends Logging { val combinedMsgs = msgs.combineByKey( combiner.createCombiner _, combiner.mergeMsg _, combiner.mergeCombiners _, partitioner) val grouped = combinedMsgs.groupWith(verts) + val superstep_ = superstep // Create a read-only copy of superstep for capture in closure val (processed, numMsgs, numActiveVerts) = - comp[K, V, M, C](sc, grouped, compute(_, _, aggregated, superstep), storageLevel) + comp[K, V, M, C](sc, grouped, compute(_, _, aggregated, superstep_), storageLevel) val timeTaken = System.currentTimeMillis - startTime logInfo("Superstep %d took %d s".format(superstep, timeTaken / 1000)) |