Skip to content

Commit 695b7a3

Browse files
committed
changed partitionsRDD in EdgeRDDImpl, VertexRDDImpl to be non-transient
1 parent cc00767 commit 695b7a3

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

graphx/src/main/scala/org/apache/spark/graphx/impl/EdgeRDDImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import org.apache.spark.storage.StorageLevel
2626
import org.apache.spark.graphx._
2727

2828
class EdgeRDDImpl[ED: ClassTag, VD: ClassTag] private[graphx] (
29-
@transient override val partitionsRDD: RDD[(PartitionID, EdgePartition[ED, VD])],
29+
override val partitionsRDD: RDD[(PartitionID, EdgePartition[ED, VD])],
3030
val targetStorageLevel: StorageLevel = StorageLevel.MEMORY_ONLY)
3131
extends EdgeRDD[ED](partitionsRDD.context, List(new OneToOneDependency(partitionsRDD))) {
3232

graphx/src/main/scala/org/apache/spark/graphx/impl/VertexRDDImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import org.apache.spark.storage.StorageLevel
2727
import org.apache.spark.graphx._
2828

2929
class VertexRDDImpl[VD] private[graphx] (
30-
@transient val partitionsRDD: RDD[ShippableVertexPartition[VD]],
30+
val partitionsRDD: RDD[ShippableVertexPartition[VD]],
3131
val targetStorageLevel: StorageLevel = StorageLevel.MEMORY_ONLY)
3232
(implicit override protected val vdTag: ClassTag[VD])
3333
extends VertexRDD[VD](partitionsRDD.context, List(new OneToOneDependency(partitionsRDD))) {

graphx/src/test/scala/org/apache/spark/graphx/GraphSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,8 @@ class GraphSuite extends FunSuite with LocalSparkContext {
385385
val verticesDependencies = graph.vertices.partitionsRDD.dependencies
386386
assert(edgesDependencies.forall(_.rdd.isInstanceOf[CheckpointRDD[_]]))
387387
assert(verticesDependencies.forall(_.rdd.isInstanceOf[CheckpointRDD[_]]))
388+
assert(graph.isCheckpointed)
389+
assert(graph.getCheckpointFiles.size === 2)
388390
}
389391
}
390392

0 commit comments

Comments
 (0)