增加datanode新节点

1. 在新节点上启动datanode和tasktracker
hadoop-daemon.sh start datanode
hadoop-daemon.sh start tasktracker


2. 进行block块的均衡
在hdfs-site.xml中增加设置balance的带宽,默认只有1M:
<property>
<name>dfs.balance.bandwidthPerSec</name>
<value>10485760</value>
<description>
Specifies the maximum bandwidth thateach datanode can utilize for the balancing purpose in term of the number ofbytes per second.
</description>
</property>
运行以下命令:
start-balancer.sh-threshold 3

你可能感兴趣的:(datanode)