[Spark]Spark core的算子总结

  1. 转换过滤算子
    map  : (map flatMap mapPartitions mapPartitionWithIndex)     
    filter
  2. ByKey算子
    分组:groupByKey
     排序:sortByKey
     统计:countByKey
     reduce处理:(reduce reduceByKey aggregateByKey)
  3. 获取算子
    take
     takeSample
     collect
     saveAsTextFile
  4. 两个集合算子
    交集:intersection 
     并集:union
     笛卡尔积:cartesian
     join 
     cogroup
  5. 单独集合处理算子
    去重:distinct
     统计:count
  6. partition管理算子
    压缩:coalesce
     重置:repartition
相关文章
相关标签/搜索