码迷,mamicode.com
首页 > 其他好文 > 详细

Spark Transformations

时间:2016-10-23 20:16:56      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:ast   fas   reduce   map   ide   lte   rdd   分享   transform   

 

We all know the following fact:

1, RDD are immutable

2, Never modify RDD in place

3, Transform RDD to another RDD

There are 2 different transformations for RDD, one is narrow transformation:

技术分享

transformations like map, flatMap, filter all are narrow transformation, which means shuffle won‘t happen, so it‘s fast, it‘s speed just depends on:

1, availability of local memory

2, CPU speed

another is wide transfomration:

技术分享

transformations like groupByKey, reduceByKey, repartition all are wide tranformation, the network speed in shuffle is the key to it‘s speed, so it‘s slower

the final comparison:

技术分享

Spark Transformations

标签:ast   fas   reduce   map   ide   lte   rdd   分享   transform   

原文地址:http://www.cnblogs.com/dingjunnan/p/5990431.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!