Transformation
- filter
- map
- mapToPair
- flatMap
- reduceByKey
- sortBy/sortByKey
- sample
- join
- leftOuterJoin
- rightOuterJoin
- fullOuterJoin
- union
- intersection
- subtract
- distinct
- cogroup
- mapPartitions
- repartition repartition = coalesce(num,true)
- coalesce
- mapPartitionWithIndex
- groupByKey
- zip
- zipWithIndex
- combineByKey
- aggregateByKey
这里面注意 sortbykey会触发job具体为啥还没看
Action算子 触发job任务
- foreach
- count
- first
- take(num)
- collect()
- foreachPartition
- reduce
- countByKey
- countByValue