srowen commented on a change in pull request #27600: [MINOR][ML] ML cleanup
URL: https://github.com/apache/spark/pull/27600#discussion_r380226459
##########
File path:
mllib/src/main/scala/org/apache/spark/mllib/clustering/StreamingKMeans.scala
##########
@@ -95,7 +95,7 @@ class StreamingKMeansModel @Since("1.2.0") (
val discount = timeUnit match {
case StreamingKMeans.BATCHES => decayFactor
case StreamingKMeans.POINTS =>
- val numNewPoints = pointStats.view.map { case (_, (_, n)) =>
+ val numNewPoints = pointStats.iterator.map { case (_, (_, n)) =>
Review comment:
I guess same question - is the .view needed at all? I'm trying to think of
what the original purpose was.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]