For example, if the ip address of the newly added node is 192.168.1.xxx, add the hosts of 192.168.1.xxxdatanode-xxx to all nn and dn nodes, create useraddhadoop-sbinbash-m on xxx, and add the ip address of another dn. all files in ssh are copied to homehadoop on xxx. install jdkapt-getinstallsun-java6-j in ssh path
For example, if the ip address of the newly added node is 192.168.1.xxx, add the hosts of 192.168.1.xxx datanode-xxx to all nn and dn nodes, create useradd hadoop-s/bin/bash-m on xxx, and add other dn. copy all files in ssh to/home/hadoop/on xxx /. install jdk apt-get install sun-java6-j In the ssh path
For example, the ip address of the newly added node is 192.168.1.xxx.
Add the hosts of 192.168.1.xxx datanode-xxx to all nn and dn nodes.
Create a user on xxx
Useradd hadoop-s/bin/bash-m
Copy all. ssh files from other dn instances to the/home/hadoop/. ssh path on xxx.
Install jdk
Apt-get install sun-java6-jdk
Copy the hadoop file to/home/hadoop
Modify slaves files
Add datanode-xxx
And synchronized to various cluster nodes
Switch to hadoop user
Start a Data Node
Bin/hadoop-daemon.sh start datanode
Bin/hadoop-daemon.sh start tasktracker
Data Synchronization will be performed after completion.
Bin/start-balancer.sh-threshold 3
For new nodes:
You need to reset the hostname and the hostname to the same content as the slaves configuration file.
Hostname datanode-xxx (expired after restart)
Modify/etc/hostname and run/etc/init. d/hostname. sh start (it will not expire after restart)
Then you can use
Http: // namenodeip: 50070 to check whether the newly added node can be normally introduced to the cluster.
Original article address: Introduce a new DataNode node to the Hadoop cluster. Thank you for sharing your feedback.