首页 文章

RDD分区和切片之间有什么区别?

提问于
浏览
19

Spark Programming Guide提到切片作为RDD的特征(并行集合或Hadoop数据集 . )("Spark will run one task for each slice of the cluster.")但是在RDD持久性部分下,使用了分区的概念而没有引入 . 此外,RDD docs仅提及没有提及切片的分区,而SparkContext docs提到用于创建RDD的切片,但是用于在RDD上运行作业的分区 . 这两个概念是一样的吗?如果没有,它们有何不同?

Tuning - Level of Parallelism表示"Spark automatically sets the number of “map” tasks to run on each file according to its size ... and for distributed “reduce” operations, such as groupByKey and reduceByKey, it uses the largest parent RDD’s number of partitions. You can pass the level of parallelism as a second argument...."这样可以解释分区和切片之间的区别吗?分区与RDD存储有关,切片与并行度有关,默认情况下,接头是根据数据大小还是分区数计算的?

1 回答

相关问题