Github user feynmanliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/4286#discussion_r38369015
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/BlockMatrix.scala
---
@@ -246,4 +246,135 @@ class BlockMatrix(
val localMat = toLocalMatrix()
new BDM[Double](localMat.numRows, localMat.numCols, localMat.toArray)
}
+
+ /**
+ * Forms [[MatrixBlock]]s using `rowsPerBlock` and `colsPerBlock`, which
were provided in
+ * the constructor. Even if all [[MatrixBlock]]s (except the ones on the
right and bottom edge)
+ * have dimensions `rowsPerBlock`x`colsPerBlock`, a new [[BlockMatrix]]
will be returned.
+ */
+ def repartition(): BlockMatrix = {
+ repartition(rowsPerBlock, colsPerBlock)
+ }
+
+ /**
+ * Forms [[MatrixBlock]]s using the provided dimensions
`newRowsPerBlock`x`newColsPerBlock`
+ * Even if all [[MatrixBlock]]s (except the ones on the right and bottom
edge)
--- End diff --
Sane nit
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]