Repository: spark Updated Branches: refs/heads/master ab0053349 -> aeda76e2b
[GRAPHX] Remove unused variables left over by previous refactoring. ## What changes were proposed in this pull request? Some variables were previously used for indexing the routing table's backing array, but that indexing now happens elsewhere, and so the variables aren't needed. ## How was this patch tested? Unit tests. (This contribution is my original work and I license the work to Spark under its open source license.) Closes #23112 from huonw/remove-unused-variables. Authored-by: Huon Wilson <[email protected]> Signed-off-by: Sean Owen <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/aeda76e2 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/aeda76e2 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/aeda76e2 Branch: refs/heads/master Commit: aeda76e2b74ef07b2814770d68cf145cdbb0197c Parents: ab00533 Author: Huon Wilson <[email protected]> Authored: Thu Nov 22 15:43:04 2018 -0600 Committer: Sean Owen <[email protected]> Committed: Thu Nov 22 15:43:04 2018 -0600 ---------------------------------------------------------------------- .../org/apache/spark/graphx/impl/ShippableVertexPartition.scala | 4 ---- 1 file changed, 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/aeda76e2/graphx/src/main/scala/org/apache/spark/graphx/impl/ShippableVertexPartition.scala ---------------------------------------------------------------------- diff --git a/graphx/src/main/scala/org/apache/spark/graphx/impl/ShippableVertexPartition.scala b/graphx/src/main/scala/org/apache/spark/graphx/impl/ShippableVertexPartition.scala index a4e293d..184b964 100644 --- a/graphx/src/main/scala/org/apache/spark/graphx/impl/ShippableVertexPartition.scala +++ b/graphx/src/main/scala/org/apache/spark/graphx/impl/ShippableVertexPartition.scala @@ -117,13 +117,11 @@ class ShippableVertexPartition[VD: ClassTag]( val initialSize = if (shipSrc && shipDst) routingTable.partitionSize(pid) else 64 val vids = new PrimitiveVector[VertexId](initialSize) val attrs = new PrimitiveVector[VD](initialSize) - var i = 0 routingTable.foreachWithinEdgePartition(pid, shipSrc, shipDst) { vid => if (isDefined(vid)) { vids += vid attrs += this(vid) } - i += 1 } (pid, new VertexAttributeBlock(vids.trim().array, attrs.trim().array)) } @@ -137,12 +135,10 @@ class ShippableVertexPartition[VD: ClassTag]( def shipVertexIds(): Iterator[(PartitionID, Array[VertexId])] = { Iterator.tabulate(routingTable.numEdgePartitions) { pid => val vids = new PrimitiveVector[VertexId](routingTable.partitionSize(pid)) - var i = 0 routingTable.foreachWithinEdgePartition(pid, true, true) { vid => if (isDefined(vid)) { vids += vid } - i += 1 } (pid, vids.trim().array) } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
