Skip to content

Commit 1a63b20

Browse files
committed
[SPARK-3974] Remove setPartition method. Isn't required
1 parent 1e8bb2a commit 1a63b20

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/BlockMatrix.scala

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class BlockMatrix(
106106
this(numRowBlocks, numColBlocks, rdd)
107107
val part = new GridPartitioner(numRowBlocks, numColBlocks, rowsPerBlock,
108108
colsPerBlock, rdd.partitions.length)
109-
setPartitioner(part)
109+
partitioner = part
110110
}
111111

112112
private[mllib] var partitioner: GridPartitioner = {
@@ -115,14 +115,6 @@ class BlockMatrix(
115115
firstSubMatrix.numRows, firstSubMatrix.numCols, rdd.partitions.length)
116116
}
117117

118-
/**
119-
* Set the partitioner for the matrix. For internal use only. Users should use `repartition`.
120-
* @param part A partitioner that specifies how SubMatrices are stored in the cluster
121-
*/
122-
private def setPartitioner(part: GridPartitioner): Unit = {
123-
partitioner = part
124-
}
125-
126118
private lazy val dims: (Long, Long) = getDim
127119

128120
override def numRows(): Long = dims._1

0 commit comments

Comments
 (0)