spark算子大致上可分三大类算子:
1、Value数据类型的Transformation算子,这种变换不触发提交作业,针对处理的数据项是Value型的数据。
2、Key-Value数据类型的Transformation算子,这种变换不触发提交作业,针对处理的数据项是Key-Value型的数据。
3、Action算子,这类算子会触发SparkContext提交作业。
一、Value型Transformation算子
1)map
2)flatMap
3)mapPartiions
4)glom
5)union
6)cartesian
7)groupBy
8)filter
9)distinct
10)subtract
11)sample
12)takesample
13)cache、persist
二、Key-Value型Transformation算子
1)mapValues
2)combineByKey
3)reduceByKey
4)partitionBy
5)cogroup
6)join
7)leftOutJoin
8)rightOutJoin
原文:http://www.cnblogs.com/liuzhongfeng/p/5285613.html