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>