diff options
author | Tathagata Das <tathagata.das1565@gmail.com> | 2012-07-27 23:16:37 +0000 |
---|---|---|
committer | Tathagata Das <tathagata.das1565@gmail.com> | 2012-07-27 23:16:37 +0000 |
commit | cf429699e1073812c29308d24270768640063bf8 (patch) | |
tree | 4fedd2d43cc8bb450dc9851af7de4b22be688f33 | |
parent | 3e271c3b61daa371a01e3ae287980c5af1045475 (diff) | |
download | spark-cf429699e1073812c29308d24270768640063bf8.tar.gz spark-cf429699e1073812c29308d24270768640063bf8.tar.bz2 spark-cf429699e1073812c29308d24270768640063bf8.zip |
Updated the new checkpoint RDD to remember partitioning of the original RDD.
-rw-r--r-- | core/src/main/scala/spark/RDD.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/scala/spark/RDD.scala b/core/src/main/scala/spark/RDD.scala index 1190e64f8f..5035bb14df 100644 --- a/core/src/main/scala/spark/RDD.scala +++ b/core/src/main/scala/spark/RDD.scala @@ -105,7 +105,12 @@ abstract class RDD[T: ClassManifest](@transient sc: SparkContext) extends Serial persist(level) sc.runJob(this, (iter: Iterator[T]) => {} ) - new BlockRDD[T](sc, splits.map(getSplitKey).toArray) + + val p = this.partitioner + + new BlockRDD[T](sc, splits.map(getSplitKey).toArray) { + override val partitioner = p + } } // Read this RDD; will read from cache if applicable, or otherwise compute |