RDD 五大特性


1)A list of partitions

一組分區:RDD由很多partition構成,有多少partition就對應有多少task

2)A function for computing each split

一個函數:對RDD做計算,相當於對RDD的每個split或partition做計算

3)A list of dependencies on other RDDs

RDD之間有依賴關系,可溯源

4)Optionally, a Partitioner for key-value RDDs (e.g. to say that the RDD is hash-partitioned)

一個Partitioner:即RDD的分片函數,如果RDD里面存的數據是key-value形式,則可以傳遞一個自定義的Partitioner進行重新分區

5)Optionally, a list of preferred locations to compute each split on (e.g. block locations for an HDFS file)

一個列表:存儲存取每個Partition的優先位置(preferred location),計算每個split時,在split所在機器的本地上運行task是最好的,避免了數據的移動,split有多個副本,所以preferred location不止一個


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM