aboutsummaryrefslogtreecommitdiff
path: root/graphx/src
diff options
context:
space:
mode:
authoruncleGen <hustyugm@gmail.com>2014-09-02 18:41:54 -0700
committerAnkur Dave <ankurdave@gmail.com>2014-09-02 18:44:58 -0700
commit7c9bbf172512701c75992671bcb2f4b6d9e5034b (patch)
treed36b165709807502938fb37051a684ec5314dff8 /graphx/src
parent7c92b49d6b62f88fcde883aacb60c5e32ae54b30 (diff)
downloadspark-7c9bbf172512701c75992671bcb2f4b6d9e5034b.tar.gz
spark-7c9bbf172512701c75992671bcb2f4b6d9e5034b.tar.bz2
spark-7c9bbf172512701c75992671bcb2f4b6d9e5034b.zip
[SPARK-3123][GraphX]: override the "setName" function to set EdgeRDD's name manually just as VertexRDD does.
Author: uncleGen <hustyugm@gmail.com> Closes #2033 from uncleGen/master_origin and squashes the following commits: 801994b [uncleGen] Update EdgeRDD.scala
Diffstat (limited to 'graphx/src')
-rw-r--r--graphx/src/main/scala/org/apache/spark/graphx/EdgeRDD.scala10
1 files changed, 9 insertions, 1 deletions
diff --git a/graphx/src/main/scala/org/apache/spark/graphx/EdgeRDD.scala b/graphx/src/main/scala/org/apache/spark/graphx/EdgeRDD.scala
index 899a3cbd62..5bcb96b136 100644
--- a/graphx/src/main/scala/org/apache/spark/graphx/EdgeRDD.scala
+++ b/graphx/src/main/scala/org/apache/spark/graphx/EdgeRDD.scala
@@ -37,7 +37,15 @@ class EdgeRDD[@specialized ED: ClassTag, VD: ClassTag](
val targetStorageLevel: StorageLevel = StorageLevel.MEMORY_ONLY)
extends RDD[Edge[ED]](partitionsRDD.context, List(new OneToOneDependency(partitionsRDD))) {
- partitionsRDD.setName("EdgeRDD")
+ override def setName(_name: String): this.type = {
+ if (partitionsRDD.name != null) {
+ partitionsRDD.setName(partitionsRDD.name + ", " + _name)
+ } else {
+ partitionsRDD.setName(_name)
+ }
+ this
+ }
+ setName("EdgeRDD")
override protected def getPartitions: Array[Partition] = partitionsRDD.partitions