gpt4 book ai didi

java - 为什么 map 变换是窄的?

转载 作者:塔克拉玛干 更新时间:2023-11-01 22:22:55 24 4
gpt4 key购买 nike

我知道 RDD 的窄转换和宽转换之间的区别。我的问题是证明 map 、平面图为窄的参数是什么?为什么这些转变不广泛?对 RDD 学习 Material 的任何建议表示赞赏。

最佳答案

Here is one explanation

– Narrow dependency: RDD operations like map, union, filter can operate on a single partition and map the data of that partition to resulting single partition. These kind of operations which maps data from one to one partition are referred as Narrow operations. Narrow operations doesn’t required to distribute the data across the partitions.

– Wide dependency: RDD operations like groupByKey, distinct, join may require to map the data across the partitions in new RDD. These kind of operations which maps data from one to many partitions are referred as Wide operations

另一种思考方式是这样的。子 RDD 的任何行都将仅依赖于父 RDD 的一行。由于每个子行都可以指向它所依赖的 1 个父行,因此存在窄依赖性。

关于java - 为什么 map 变换是窄的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37755576/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com