Skip to content

Commit

Permalink
use toSeq instead
Browse files Browse the repository at this point in the history
  • Loading branch information
holdenk committed Apr 8, 2014
1 parent 7a092a3 commit d3fe909
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions mllib/src/main/scala/org/apache/spark/mllib/linalg/SVD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,7 @@ class SVD {
val rows = data.map(entry =>
(entry.i, (entry.j, entry.mval))).groupByKey()
val emits = rows.flatMap {
case (rowind, colsI) =>
val cols = colsI.toList
case (rowind, cols) =>
cols.flatMap {
case (colind1, mval1) =>
cols.map {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ class ALS private (
: Array[Array[Double]] =
{
// Sort the incoming block factor messages by block ID and make them an array
val blockFactors = messages.toArray.sortBy(_._1).map(_._2) // Array[Array[Double]]
val blockFactors = messages.toSeq.sortBy(_._1).map(_._2).toArray // Array[Array[Double]]
val numBlocks = blockFactors.length
val numUsers = inLinkBlock.elementIds.length

Expand Down

0 comments on commit d3fe909

Please sign in to comment.