From a4b8ddf41708d1601ab2820e67efc18c7d983c09 Mon Sep 17 00:00:00 2001 From: "Joseph E. Gonzalez" Date: Wed, 30 Oct 2013 16:07:05 -0700 Subject: [PATCH] removing unused commented code --- .../apache/spark/graph/impl/GraphImpl.scala | 62 ------------------- 1 file changed, 62 deletions(-) diff --git a/graph/src/main/scala/org/apache/spark/graph/impl/GraphImpl.scala b/graph/src/main/scala/org/apache/spark/graph/impl/GraphImpl.scala index bdf79bf9f0..13f9c53189 100644 --- a/graph/src/main/scala/org/apache/spark/graph/impl/GraphImpl.scala +++ b/graph/src/main/scala/org/apache/spark/graph/impl/GraphImpl.scala @@ -80,21 +80,6 @@ object EdgeTripletBuilder { } -// { -// val iterFun = (iter: Iterator[(Pid, ((VertexIdToIndexMap, Array[VD]), EdgePartition[ED]))]) => { -// val (pid, ((vidToIndex, vertexArray), edgePartition)) = iter.next() -// assert(iter.hasNext == false) -// // Return an iterator that looks up the hash map to find matching -// // vertices for each edge. -// new EdgeTripletIterator(vidToIndex, vertexArray, edgePartition) -// } -// ClosureCleaner.clean(iterFun) -// localVidMap.zipJoin(vTableReplicatedValues).zipJoinRDD(eTable) -// .mapPartitions( iterFun ) // end of map partition -// } -// } - - /** * A Graph RDD that supports computation on graphs. */ @@ -105,9 +90,6 @@ class GraphImpl[VD: ClassManifest, ED: ClassManifest] protected ( @transient val eTable: RDD[(Pid, EdgePartition[ED])] ) extends Graph[VD, ED] { -// def this() = this(null,null,null) - - /** * (localVidMap: VertexSetRDD[Pid, VertexIdToIndexMap]) is a version of the * vertex data after it is replicated. Within each partition, it holds a map @@ -136,21 +118,6 @@ class GraphImpl[VD: ClassManifest, ED: ClassManifest] protected ( EdgeTripletBuilder.makeTriplets(localVidMap, vTableReplicatedValues, eTable) - // { - // val iterFun = (iter: Iterator[(Pid, (VertexHashMap[VD], EdgePartition[ED]))]) => { - // val (pid, (vmap, edgePartition)) = iter.next() - // //assert(iter.hasNext == false) - // // Return an iterator that looks up the hash map to find matching - // // vertices for each edge. - // new EdgeTripletIterator(vmap, edgePartition) - // } - // ClosureCleaner.clean(iterFun) - // vTableReplicated.join(eTable).mapPartitions( iterFun ) // end of map partition - // } - - - - override def cache(): Graph[VD, ED] = { eTable.cache() vid2pid.cache() @@ -213,13 +180,6 @@ class GraphImpl[VD: ClassManifest, ED: ClassManifest] protected ( new GraphImpl(vTable, vid2pid, localVidMap, newETable) } - // override def correctEdges(): Graph[VD, ED] = { - // val sc = vertices.context - // val vset = sc.broadcast(vertices.map(_.id).collect().toSet) - // val newEdges = edges.filter(e => vset.value.contains(e.src) && vset.value.contains(e.dst)) - // Graph(vertices, newEdges) - // } - override def subgraph(epred: EdgeTriplet[VD,ED] => Boolean = (x => true), vpred: (Vid, VD) => Boolean = ((a,b) => true) ): Graph[VD, ED] = { @@ -529,28 +489,6 @@ object GraphImpl { }.cache() // @todo assert edge table has partitioner - - // val localVidMap: VertexSetRDD[Pid, VertexIdToIndexMap] = - // msgsByPartition.mapPartitionsWithIndex( (pid, iter) => { - // val vidToIndex = new VertexIdToIndexMap - // var i = 0 - // for (msg <- iter) { - // vidToIndex.put(msg.data._1, i) - // i += 1 - // } - // Array((pid, vidToIndex)).iterator - // }, preservesPartitioning = true).indexed(eTable.index) - - // val vTableReplicatedValues: VertexSetRDD[Pid, Array[VD]] = - // msgsByPartition.mapPartitionsWithIndex( (pid, iter) => { - // val vertexArray = ArrayBuilder.make[VD] - // for (msg <- iter) { - // vertexArray += msg.data._2 - // } - // Array((pid, vertexArray.result)).iterator - // }, preservesPartitioning = true).indexed(eTable.index) - - // (localVidMap, vTableReplicatedValues) }