Repository: spark
Updated Branches:
  refs/heads/master 7c92b49d6 -> 7c9bbf172


[SPARK-3123][GraphX]: override the "setName" function to set EdgeRDD's name 
manually just as VertexRDD does.

Author: uncleGen <husty...@gmail.com>

Closes #2033 from uncleGen/master_origin and squashes the following commits:

801994b [uncleGen] Update EdgeRDD.scala


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/7c9bbf17
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7c9bbf17
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7c9bbf17

Branch: refs/heads/master
Commit: 7c9bbf172512701c75992671bcb2f4b6d9e5034b
Parents: 7c92b49
Author: uncleGen <husty...@gmail.com>
Authored: Tue Sep 2 18:41:54 2014 -0700
Committer: Ankur Dave <ankurd...@gmail.com>
Committed: Tue Sep 2 18:44:58 2014 -0700

----------------------------------------------------------------------
 .../src/main/scala/org/apache/spark/graphx/EdgeRDD.scala  | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/7c9bbf17/graphx/src/main/scala/org/apache/spark/graphx/EdgeRDD.scala
----------------------------------------------------------------------
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 899a3cb..5bcb96b 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
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to