开发者社区 问答 正文

用户怎么设定哪些 RDD 要 cache?

用户怎么设定哪些 RDD 要 cache?

展开
收起
芯在这 2021-12-07 22:29:36 256 分享 版权
1 条回答
写回答
取消 提交回答
  • 因为用户只与 driver program 打交道,因此只能用 rdd.cache() 去 cache 用户能看到的 RDD。所谓能看到指的是调用 transformation() 后生成的 RDD,而某些在 transformation() 中 Spark 自己生成的 RDD 是不能被用户直接 cache 的,比如 reduceByKey() 中会生成的 ShuffledRDD、MapPartitionsRDD 是不能被用户直接 cache 的。

    2021-12-07 22:29:51
    赞同 展开评论
问答分类:
问答地址: