1. 程式人生 > >Spark學習---RDD

Spark學習---RDD

說的挺好的就是有點亂,有一些資料彙總。

另外圖解spark 核心技術與案例實戰這本書也挺好的,推薦入門者讀。

總而言之RDD是彈性分散式資料集,推薦大家背英文

RDD is the spark's core abstraction which is short for resilient distributed dataset.

這裡的resilient的意思是:able to withstand or recover quickly from difficult conditions.

即這些集合是彈性的,如果資料集的一部分丟失,則可以根據“血統”對它們進行重建,保證了資料的高容錯性。由於RDD提供一種基於粗粒度變換的介面,該介面會將相同的操作應用到多個數據集,這就算他們可以記錄建立資料集的血統,而不需要儲存真正的資料,從而達到高效的容錯性,這麼看來是不是有點區塊鏈的意思呀。

It is the immutable distributed collection of objects and has the ability to be recomputed from history.

Internally spark distributes the data in RDD to different nodes across the cluster to achieve parallelization.

RDD的支援兩種操作:轉換(Transformation)和動作(actions). 轉換(transformation)從現有的資料集建立一個新的資料集;而動作(actions)在資料集上執行計算後,返回一個值給驅動程式。

RDD的依賴關係: