Skip to content

Commit a4a316b

Browse files
committed
Use collect
1 parent 1472ec5 commit a4a316b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mllib/src/main/scala/org/apache/spark/mllib/clustering/StreamingKMeans.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class StreamingKMeansModel(
8383
(p1._1 += p2._1, p1._2 + p2._2)
8484
}
8585
val pointStats: Array[(Int, (BV[Double], Long))] =
86-
closest.reduceByKey{mergeContribs}.collectAsMap().toArray
86+
closest.reduceByKey(mergeContribs).collect()
8787

8888
// implement update rule
8989
for (newP <- pointStats) {

0 commit comments

Comments
 (0)