spark程序中cache的作用 + 實驗

spark中cache的作用: 圖例: 其中, result1和result2用到了同一個rdd(rdd2)做操作 如果rdd2不加cache: 由於spark程序爲lazy操作, 所以在計算result1時, step1 -> step2 -> step3會全部走一遍, 計算result2時, step1 -> step2 -> step3也會全部走一遍, 其中step1 -> step2爲重複
相關文章
相關標籤/搜索