gpt4 book ai didi

hadoop - 如何在Hadoop中设置NameNodes、DataNodes、Mappers和Reducers的数量

转载 作者:可可西里 更新时间:2023-11-01 15:27:54 27 4
gpt4 key购买 nike

我想知道如何设置数量

NameNode

数据节点

映射器

reducer

Hadoop 的代码/配置中。

最佳答案

Namenode 和 DataNode 数量 由您的业务需求决定。您无需通过编程来设置它们。

如果您需要可伸缩性,则必须了解 HDFS 联邦的概念。

请参阅此文档 page有关联邦的更多详细信息。

In order to scale the name service horizontally, federation uses multiple independent Namenodes/namespaces. The Namenodes are federated; the Namenodes are independent and do not require coordination with each other. The Datanodes are used as common storage for blocks by all the Namenodes.

enter image description here

映射器的数量由输入拆分决定。

您可以通过编程方式设置reducer 数量,但 framwork 没有义务遵守您的建议。

因此,最好让 Hadoop 决定 Mappers 和 Reducers 的数量。

看看这个相关的 SE 问题:

How hadoop decides how many nodes will do map and reduce tasks

编辑:

Hadoop 集群大小:1. 根据您的业务需求确定数据需求2. 确定数据的复制因子3.计算 future 几年的数据爆炸率4. 有了以上数据后,您就可以考虑 Namenode 和 Datanode 的理想集群大小和硬件要求。

引用这个cloudera article更多细节。

The right level of parallelism for maps seems to be around 10-100 maps per-node" node here means NameNode or DataNode?

它是数据节点。

when talking about Mappers some says same number as splits, another says same number of blocks, while others say it is determined by the framework

它是由 hadoop 框架根据输入拆分的数量决定的。

查看相关的 SE 问题:

How does Hadoop perform input splits?

关于hadoop - 如何在Hadoop中设置NameNodes、DataNodes、Mappers和Reducers的数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40828615/

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