Spark transform 与action算子

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

猜你喜欢

转载自blog.csdn.net/chixushuchu/article/details/86307268
今日推荐