开发者社区 问答 正文

Transformations 算子中的flatMap的作用是什么?

Transformations 算子中的flatMap的作用是什么?

展开
收起
游客nxq6attzvywgk 2021-12-06 22:01:31 569 分享 版权
1 条回答
写回答
取消 提交回答
  • Transformations 算子中的flatMap的作用是将原来 RDD 中的每个元素通过函数 f 转换为新的元素,并将生成的 RDD 的每个集合中的元素合并为一个集合,内部创建 FlatMappedRDD(this,sc.clean(f))。

    2021-12-06 22:02:02
    赞同 展开评论
问答地址: