spark算子详细介绍(v、k-v、vv类型)_spark字段名和kv字段名是什么-CSDN博客

网站介绍:文章浏览阅读2.8k次,点赞3次,收藏5次。spark算子1. map算子(改变结构就用map)mapPartitions() 以分区为单位执行Map思考一个问题:map和mapPartitions的区别?3. mapPartitionsWithIndex()带分区号4. flatMap()扁平化5. glom()分区转换数组6. groupBy()分组filter() 过滤7. sample()采样思考一个问题:sample有啥用,抽奖吗?8. distinct()去重思考一个问题:如果不用该算子,你有什么办法实现数据去重?9. coalesce(_spark字段名和kv字段名是什么