HDFS新增结点
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
1.复制出一台新的虚拟机
2.修改ip和mac地址
vim /etc/udev/rules.d/70-persistent-net.rules
vim /etc/sysconfig/network-scripts/ifcfg-eth0
3. 关闭防火墙 selinux
关闭防火墙
service iptables stop
关闭selinux
vim /etc/selinux/config
4.修改主机名
vim /etc/sysconfig/network
5.设置ip对应主机名
vim /etc/hosts
192.168.52.100 node01
192.168.52.110 node02
192.168.52.120 node03
192.168.52.130 node04
6.服务器重启
reboot
7.服役新的节点
1.创建一个 dfs.hosts(白名单)
cd /export/servers/hadoop-2.6.0-cdh5.14.0/etc/hadoop
vim dfs.hosts
添加内容
node01
node02
node03
node04
2.修改 hdfs-site.xml 添加配置
cd /export/servers/Hadoop-2.6.0-cdh5.14.0/etc/Hadoop
vim hdfs-site.xml
<property>
<name>dfs.hosts</name>
<value>/export/servers/hadoop-2.6.0-cdh5.14.0/etc/hadoop/dfs.hosts</value>
</property>
3.刷新
刷新namenode
hdfs dfsadmin -refreshNodes
刷新resorceManager
yarn rmadmin -refreshNodes
4.新增节点 slaves
node01
node02
node03
node04
5.单独启动节点(node04)
sbin/hadoop-daemon.sh start datanode
sbin/yarn-daemon.sh start nodemanager
6.负载均衡让所数据均衡在每个服务器上
sbin/start-balancer.sh
8.退役数据节点
1.创建 dfs.hosts.exclude
黑名单
vim dfs.hosts.exclude
node04
2.编辑namenode上的hdfs-site.xml
vim hdfs-site.xml
<property>
<name>dfs.hosts.exclude</name>
<value>/export/servers/hadoop-2.6.0-cdh5.14.0/etc/hadoop/dfs.hosts.exclude</value>
</property>
3.刷新namenode 和resourcemanager
hdfs dfsadmin -refreshNodes
yarn rmadmin -refreshNodes
4.浏览器查看
5.节点退役完成,停止该节点进行
sbin/hadoop-daemon.sh stop datanode
sbin/yarn-daemon.sh stop nodemanager
6.从include文件中删除退役节点
vim dfs.hosts
删除node04
node01
node02
node03
刷新namenode 和resourcemanager
hdfs dfsadmin -refreshNodes
yarn rmadmin -refreshNodes
7.从namenode的slave文件中删除退役节点
vim slaves
node01
node02
node03
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献8条内容
所有评论(0)