https://github.com/apache/spark/blob/master/examples/src/main/scala/org/apache/spark/examples/SparkKMeans.scala#L82
就是这里第82行
val pointStats = closest.reduceByKey{case ((p1, c1), (p2, c2)) => (p1 + p2, c1 + c2)}
整个不懂啥意思,另外,为什么reduceByKey后面是大括号{}
相关分类