1、配置主机名
2、修改各服务器hosts,添加新机器的主机名
3、配置新机器ssh无密钥登录。
4、从其他机器拷贝hadoop安装文件
5、修改namenode的配置文件slaves ,添加新增节点的host
6、在新节点的机器上,启动服务
[hadoop@datanode4~]#hadoop-daemon.sh start datanode
[hadoop@datanode4~]#hadoop-daemon.sh start tasktracker
7、均衡block
[hadoop@datanode4~]#start-balancer.sh
1)如果不balance,那么cluster会把新的数据都存放在新的node上,这样会降低mapred的工作效率
2)设置平衡阈值,默认是10%,值越低各节点越平衡,但消耗时间也更长
[hadoop@datanode4~]# start-balancer.sh -threshold 10
3)设置balance的带宽,默认只有1M/s
<property>
<name>dfs.balance.bandwidthPerSec</name>
<value>1048576</value>
<description>
Specifies themaximum amount of bandwidth that each datanode can utilize for the balancingpurpose in term of the number of bytes per second.
</description>
</property>