aboutsummaryrefslogtreecommitdiff
path: root/graphx
diff options
context:
space:
mode:
authorAnkur Dave <ankurdave@gmail.com>2014-01-13 20:59:45 -0800
committerAnkur Dave <ankurdave@gmail.com>2014-01-13 21:02:37 -0800
commit84d6af80211bbe15777a8d48eb37052b0b6631c4 (patch)
treecbd0179f5470ba836d78991600909550ee166436 /graphx
parentd4d9ece1af258ccdc83afbb8ba26345d7af16422 (diff)
downloadspark-84d6af80211bbe15777a8d48eb37052b0b6631c4.tar.gz
spark-84d6af80211bbe15777a8d48eb37052b0b6631c4.tar.bz2
spark-84d6af80211bbe15777a8d48eb37052b0b6631c4.zip
Make Graph{,Impl,Ops} serializable to work around capture
Diffstat (limited to 'graphx')
-rw-r--r--graphx/src/main/scala/org/apache/spark/graphx/Graph.scala2
-rw-r--r--graphx/src/main/scala/org/apache/spark/graphx/GraphOps.scala2
-rw-r--r--graphx/src/main/scala/org/apache/spark/graphx/impl/GraphImpl.scala2
3 files changed, 3 insertions, 3 deletions
diff --git a/graphx/src/main/scala/org/apache/spark/graphx/Graph.scala b/graphx/src/main/scala/org/apache/spark/graphx/Graph.scala
index 7e99276d25..9dd05ade0a 100644
--- a/graphx/src/main/scala/org/apache/spark/graphx/Graph.scala
+++ b/graphx/src/main/scala/org/apache/spark/graphx/Graph.scala
@@ -20,7 +20,7 @@ import org.apache.spark.storage.StorageLevel
* @tparam VD the vertex attribute type
* @tparam ED the edge attribute type
*/
-abstract class Graph[VD: ClassTag, ED: ClassTag] {
+abstract class Graph[VD: ClassTag, ED: ClassTag] protected () extends Serializable {
/**
* An RDD containing the vertices and their associated attributes.
diff --git a/graphx/src/main/scala/org/apache/spark/graphx/GraphOps.scala b/graphx/src/main/scala/org/apache/spark/graphx/GraphOps.scala
index 447ef555ca..233adb9b87 100644
--- a/graphx/src/main/scala/org/apache/spark/graphx/GraphOps.scala
+++ b/graphx/src/main/scala/org/apache/spark/graphx/GraphOps.scala
@@ -14,7 +14,7 @@ import org.apache.spark.rdd.RDD
* @tparam VD the vertex attribute type
* @tparam ED the edge attribute type
*/
-class GraphOps[VD: ClassTag, ED: ClassTag](graph: Graph[VD, ED]) {
+class GraphOps[VD: ClassTag, ED: ClassTag](graph: Graph[VD, ED]) extends Serializable {
/** The number of edges in the graph. */
lazy val numEdges: Long = graph.edges.count()
diff --git a/graphx/src/main/scala/org/apache/spark/graphx/impl/GraphImpl.scala b/graphx/src/main/scala/org/apache/spark/graphx/impl/GraphImpl.scala
index 12d46a809c..56d1d9efea 100644
--- a/graphx/src/main/scala/org/apache/spark/graphx/impl/GraphImpl.scala
+++ b/graphx/src/main/scala/org/apache/spark/graphx/impl/GraphImpl.scala
@@ -32,7 +32,7 @@ class GraphImpl[VD: ClassTag, ED: ClassTag] protected (
@transient val replicatedVertexView: ReplicatedVertexView[VD])
extends Graph[VD, ED] with Serializable {
- /** Default construct is provided to support serialization */
+ /** Default constructor is provided to support serialization */
protected def this() = this(null, null, null, null)
/** Return a RDD that brings edges together with their source and destination vertices. */