Skip to content

Commit

Permalink
Use collect
Browse files Browse the repository at this point in the history
  • Loading branch information
freeman-lab committed Oct 29, 2014
1 parent 1472ec5 commit a4a316b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class StreamingKMeansModel(
(p1._1 += p2._1, p1._2 + p2._2)
}
val pointStats: Array[(Int, (BV[Double], Long))] =
closest.reduceByKey{mergeContribs}.collectAsMap().toArray
closest.reduceByKey(mergeContribs).collect()

// implement update rule
for (newP <- pointStats) {
Expand Down

0 comments on commit a4a316b

Please sign in to comment.