Setting Up Hadoop Made Easy
Setting Up Hadoop Made Easy
Setting Up Hadoop Made Easy
Version details
Following are the details of components used, all license free:
1. Hadoop 1.2.1
2. Ubuntu LTS 12.04 (running on virtual Machine) 64 Bit
3. Windows 8. (The same thing can be done on mac, i.e., install a virtual machine on mac and
follow the below procedure). Any windows machine would do well.
Download UBUNTU LTS 64 bit from the following link (Make sure its ISO format and for 64 bit):
http://www.ubuntu.com/download/desktop
Press Start.
Become a Certified Hadoop Developer on udemy by Nitesh Jain.
Look for Become a Certified Hadoop Developer on www.udemy.com
If throws an error, saying something about that 64 bit support and about
VT-x/AMD-V,
And after you have pressed continue the whole disk would
be formatted!
Nope just joking! (: Only the dynamic Disk allocated would be formatted.
The main idea behind the following steps is to create a folder for hadoop and untar (or unzip) the tar
file that has been downloaded.
1.
2.
3.
4.
5.
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
4. Change conf/hdfs-site.xml to:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
Become a Certified Hadoop Developer on udemy by Nitesh Jain.
Look for Become a Certified Hadoop Developer on www.udemy.com
Solution:
a) Stop hadoop by running 'stop-all.sh'
We need to explicitly set the 'dfs.name.dir' and 'dfs.data.dir'.
Become a Certified Hadoop Developer on udemy by Nitesh Jain.
Look for Become a Certified Hadoop Developer on www.udemy.com
<configuration>
<property>
<name>dfs.data.dir</name>
<value>/home/{user_name}/hadoop/dfs/data/</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>/home/{user_name}/hadoop/dfs/name/</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
d) Run command
hadoop namenode format
Look for the following output to confirm that the format has been successful. If you do not see
the message, format command is having some problems.
(I am pasting the output of one of the course taker Vadim and so you see the username as
Vadim here)
14/02/04 22:56:12 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = vadim-VirtualBox/127.0.1.1
STARTUP_MSG: args = [-format]
e) Run command
start-all.sh
f)
Run command
jps
and this will now show all the demons running like the below:
2310 SecondaryNameNode
1833 NameNode
2068 DataNode
2397 JobTracker
2635 TaskTracker
2723 Jps
g) Run command
stop-all.sh
and you should see the output as: