Skip to content

Commit aeda76e

Browse files
huonwsrowen
authored andcommitted
[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 apache#23112 from huonw/remove-unused-variables. Authored-by: Huon Wilson <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent ab00533 commit aeda76e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

graphx/src/main/scala/org/apache/spark/graphx/impl/ShippableVertexPartition.scala

-4
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,11 @@ class ShippableVertexPartition[VD: ClassTag](
117117
val initialSize = if (shipSrc && shipDst) routingTable.partitionSize(pid) else 64
118118
val vids = new PrimitiveVector[VertexId](initialSize)
119119
val attrs = new PrimitiveVector[VD](initialSize)
120-
var i = 0
121120
routingTable.foreachWithinEdgePartition(pid, shipSrc, shipDst) { vid =>
122121
if (isDefined(vid)) {
123122
vids += vid
124123
attrs += this(vid)
125124
}
126-
i += 1
127125
}
128126
(pid, new VertexAttributeBlock(vids.trim().array, attrs.trim().array))
129127
}
@@ -137,12 +135,10 @@ class ShippableVertexPartition[VD: ClassTag](
137135
def shipVertexIds(): Iterator[(PartitionID, Array[VertexId])] = {
138136
Iterator.tabulate(routingTable.numEdgePartitions) { pid =>
139137
val vids = new PrimitiveVector[VertexId](routingTable.partitionSize(pid))
140-
var i = 0
141138
routingTable.foreachWithinEdgePartition(pid, true, true) { vid =>
142139
if (isDefined(vid)) {
143140
vids += vid
144141
}
145-
i += 1
146142
}
147143
(pid, vids.trim().array)
148144
}

0 commit comments

Comments
 (0)