【配置CDH和管理服务】关闭DataNode前HDFS的调优

在关闭DataNode前,通过调整堆栈大小、设置平衡带宽、提高复制工作乘数器、增加复制线程限制,以及重启HDFS服务,来确保集群的稳定性和高效性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

配置CDH和管理服务

关闭DataNode前HDFS的调优

角色要求:配置员、集群管理员、完全管理员

 

当一个DataNode关闭,NameNode确保每一个DataNode中的每一个块根据复制系数(the replication factor)跨集群仍然是可用的。这个过程涉及到DataNode间小批次的块复制。在这种情况下,一个DataNode有成千上万个块,关闭后集群间还原备份数可能需要几个小时。关闭DataNode的主机之前,你应该首先调整HDFS:

 

1提高DataNode的堆栈大小。DataNode应该至少有4 GB的堆栈大小,以允许迭代的增加和最大的流

    a去HDFS服务页面;

    b单击配置(Configuration)选项卡;

    c在每个DataNode角色组(DataNode默认组和额外的DataNode角色组)去资源管理(ResourceManagement)类别,并设置DataNode的Java堆栈大小(字节)(Java Heap Size of DataNode in Bytes)

    d、点击保存更改(Save Changes提交更改。

 

2设置DataNode平衡带宽

    a展开DataNode默认组(DataNode Default Group) > 性能(Performance)类别;

    b根据你的磁盘和网络性能配置DataNode平衡带宽(DataNode Balancing Bandwidth

c点击保存更改(Save Changes提交更改。

 

3提高依据迭代设置复制工作乘数器的数值(默认值是2,然而推荐值是10)

    a展开NameNode默认组(NameNode Default Group) >高级(Advanced)类别;

    b将配置依据迭代设置复制工作乘数器(Replication Work Multiplier Per Iteration)设置为10

c点击保存更改(Save Changes提交更改。

 

4增加复制的最大线程数和最大复制线程的限制数

    a展开NameNode默认组(NameNode Default Group) >高级(Advanced)类别;

    b配置Datanode复制线程的最大数量(Maximumnumber of replication threads on a Datanode)和Datanod复制线程的数量的限制数(Hardlimit on the number of replication threads on a Datanod)分别为50和100;

    c点击保存更改(Save Changes提交更改。

 

5重新启动HDFS服务。


翻译水平有限,以下是手打英文原文:

Configuring CDH and Managed Services

Tuning HDFS Prior to Decommissioning DataNodes

Required Role: Configurator、 Cluster Administrator、 Full Administrator

 

When a DataNode isdecommissioned, the NameNode ensures that every that every block from the DataNodewill still be available across the cluster as dictated by the replicationfactor. This procedure involves copying blocks off the DataNode in smallbatches. In cases where a DataNode has thousands of blocks,decommissioning cantake several hours. Before decommissioning hosts with DataNodes,you shouldfirst tune HDFS:

 

1、Raise the heap size of the DataNodes.DataNodes should be configured with at least 4 GB heap size to allow for theincrease in iterations and max streams.

  a、Go to the HDFS service page.

  b、Click the Configuration tab.

  c、Under each DataNode role group (DataNodeDefault Group and additional DataNode role groups) go to the Resource Management category, and setthe Java Heap Size of DataNode in Bytesproperty as recommended.

d、Click SaveChanges to commit the changes.

 

2、Set the DataNode balancing bandwith:

  a、Expand the DataNode Default Group > Performancecategory.

  b、Configure the DataNode Balancing Bandwidth property to the bandwisth you have onyour disks and network.

  c、Click SaveChanges to commit the changes.

 

3、Increase the replication work multiplierper iteration to a larger number (the default is 2, however 10 is recommended):

a、Expand the NameNodeDefault Group > Advancedcatrgory.

b、Configure the ReplicationWork Multiplier Per Iteration property to a value such as 10.

c、Click SaveChanges to commit the changes.

 

4、 Increase the replication maximim threadsand maximum replication thread hard limits:

a、 Expand the NameNodeDefault Group > Advancedcategory.

  b、 Configure the Maximum number of replication threads on a Datanode and Hard limit on the number of replicationthreads on a Datanode properties to 50 and 100 respectively.

  c、 Click SaveChanges to commit the Changes.

 

5、Restart the HDFS service.


参考资源链接:[CDH5.10.2集群搭建与管理:解决大规模Hadoop部署难题](https://wenku.youkuaiyun.com/doc/paybd7eyu8?utm_source=wenku_answer2doc_content) 搭建CDH5.10.2集群并配置HDFSYARN是实现大规模分布式计算的关键步骤。首先,你需要确保所有节点硬件满足集群的基本要求,然后按照以下步骤操作: 1. 系统环境准备:对所有集群节点进行操作系统网络设置,确保节点之间可以互相通信,并安装必要的软件依赖包。 2. 安装Cloudera ManagerCloudera ManagerCDH集群的安装管理工具,可以大大简化集群的部署过程。在主节点上安装Cloudera Manager Server,并在所有节点上安装Cloudera Manager Agent。 3. 使用Cloudera Manager部署CDH:通过Cloudera Manager的Web界面启动集群部署向导,根据向导步骤创建集群并安装CDH。 4. 配置HDFS:在主节点上配置NameNode,设置好高可用性(如果需要),并在所有从节点上配置DataNode,确保它们可以正确地加入到HDFS集群中。 5. 配置YARN:设置ResourceManagerNodeManager服务,ResourceManager负责整个集群的任务资源管理,而NodeManager则运行在每个数据节点上,管理节点上的资源。 6. 确保安全设置:配置Kerberos认证(可选),这是确保集群安全的重要措施。如果集群环境需要处理敏感数据,建议开启此设置。 7. 测试集群:集群搭建完成后,进行一系列的测试,如启动HDFSYARN服务,运行MapReduce作业等,确保集群能够正常工作。 整个过程需要对Hadoop生态系统的各个组件有所了解,特别是HDFSYARN的工作原理。通过阅读《CDH5.10.2集群搭建与管理:解决大规模Hadoop部署难题》,可以获取更多关于CDH集群搭建的细节高级配置选项。这本资料不仅提供了基础的集群搭建指导,还包括了许多高级功能的配置方法,对于希望深入了解CDH集群搭建管理的用户来说,是一份宝贵的资源。 参考资源链接:[CDH5.10.2集群搭建与管理:解决大规模Hadoop部署难题](https://wenku.youkuaiyun.com/doc/paybd7eyu8?utm_source=wenku_answer2doc_content)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值