hadoop - hadoop 中的 reducer 数量

标签 hadoop mapreduce hadoop2 reducers bigdata

我在学习hadoop, 我发现 reducer 的数量非常困惑:

1) reducer 的数量与分区的数量相同。

2) reducer 的数量是 0.95 或 1.75 乘以(节点数)*(每个节点的最大容器数)。

3) reducer 的数量由 ma​​pred.reduce.tasks 设置。

4) reducer 的数量最接近于: block 大小的倍数 * 任务时间在 5 到 15 分钟之间 * 创建尽可能少的文件。

我很困惑,我们是明确设置 reducer 的数量还是由 mapreduce 程序本身完成?

reducer 的数量是如何计算的?请告诉我如何计算 reducer 的数量。

最佳答案

1 - reducer 的数量与分区的数量相同 - False。单个 reducer 可能在一个或多个分区上工作。但是选定的分区将在它启动的 reducer 上完全完成。

2 - 这只是您可以为 Hadoop 集群配置的最大 reducer 的理论数量。这在很大程度上也取决于您正在处理的数据类型(决定 reducer 承担了多少繁重的工作)。

3 - mapred-site.xml 配置只是对 Yarn 的建议。但在内部,ResourceManager 有自己的算法在运行,随时优化事情。所以这个值并不是真正的每次运行的 reducer 任务的数量。

4 - 这似乎有点不切实际。我的 block 大小可能为 128MB,每次我都不能拥有 128*5 的最小 reducer 数量。我相信这又是错误的。

没有固定数量的可以配置或计算的 reducers 任务。这取决于实际可以分配多少资源的时刻。

关于hadoop - hadoop 中的 reducer 数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38188472/

相关文章:

hadoop - 将 jars 添加到启动 map reduce 作业的代码的类路径中

java - Hadoop JobClient.runJob : Cannot initialize cluster - Misleading error message(? ) 和建议的解决方案

mapreduce - 连接两个大型数据集的最佳策略

hadoop - 控制中间体导致Hadoop

hadoop2 - 谁能说出在 jps 中不显示 hadoop 恶魔的原因吗?

database - 如何按频率对 Google 数据库(或托管在 AWS 上的数据库)中的 ngram 进行排序

eclipse - 如何在Ubuntu上安装的Hadoop上减少连接/运行 map

Hadoop 独立安装 - java.net.ConnectException : Connection refused error while running jar

hadoop - YARN-Cgroups : Failed to initialize container executor in non-secure cluster

hadoop - fsimage和hadoop中的快照有什么区别?