![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
RDD
qq_2631218300
这个作者很懒,什么都没留下…
展开
-
Spark RDD算子(3)聚合操作reduceByKey,sortByKey
reduceByKeydef reduceByKey(func: (V, V) => V): RDD[(K, V)]def reduceByKey(func: (V, V) => V, numPartitions: Int): RDD[(K, V)]def reduceByKey(partitioner: Partitioner, func: (V, V) => V): RDD[(K, V)]接受一个函数,按照相同的key进行reduce操作,类似于scala中的reduces原创 2020-11-04 19:00:13 · 267 阅读 · 0 评论 -
Spark RDD算子(2)聚合操作combineByKey,foldByKey
combinByKeydef combineByKey[C](createCombiner: (V) => C, mergeValue: (C, V) => C, mergeCombiners: (C, C) => C, partitioner: Partitioner, mapSideCombine: Boolean = true, serializer: Serializer = null): RDD[(K, C)]该函数用于将RDD[K,V]转换成RDD[K,C],这里的V类型和原创 2020-11-04 18:24:55 · 201 阅读 · 0 评论