关注 spark技术分享,
撸spark源码 玩spark最佳实践

NarrowDependency — Narrow Dependencies

NarrowDependency — Narrow Dependencies

NarrowDependency is a base (abstract) Dependency with narrow (limited) number of partitions of the parent RDD that are required to compute a partition of the child RDD.

Note
Narrow dependencies allow for pipelined execution.
Table 1. Concrete NarrowDependency-ies
Name Description

OneToOneDependency

PruneDependency

RangeDependency

NarrowDependency Contract

NarrowDependency contract assumes that extensions implement getParents method.

getParents returns the partitions of the parent RDD that the input partitionId depends on.

OneToOneDependency

OneToOneDependency is a narrow dependency that represents a one-to-one dependency between partitions of the parent and child RDDs.

PruneDependency

PruneDependency is a narrow dependency that represents a dependency between the PartitionPruningRDD and its parent RDD.

RangeDependency

RangeDependency is a narrow dependency that represents a one-to-one dependency between ranges of partitions in the parent and child RDDs.

It is used in UnionRDD for SparkContext.union, RDD.union transformation to list only a few.

赞(0) 打赏
未经允许不得转载:spark技术分享 » NarrowDependency — Narrow Dependencies
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏