HADOOP Cluster on AWS EC2 with hadoop-0.20 and ubuntu-10.04
Friday, June 17th, 2011 | Posted in Amazon EC2, Cloud computing
Let’s start with a small introduction- what is hadoop ?. Hadoop is an open-source project administered by the Apache Software Foundation. Apache Hadoop is a Java software framework that supports data-intensive distributed applications under a free license. It enables applications to work with thousands of nodes and petabytes of data. Hadoop was inspired by Google’s MapReduce and Google File System (GFS) papers.
Technically, Hadoop consists of two key services: reliable data storage using the Hadoop Distributed File System (HDFS) and high-performance parallel data processing using a technique called MapReduce.
Dealing with big data requires two things:
Inexpensive, reliable storage; and
New tools for analyzing unstructured and structured data.
Hadoop creates clusters of machines and coordinates work among them. Clusters can be built with inexpensive computers.If one fails, Hadoop continues to operate the cluster without losing data or interrupting work, by shifting work to the remaining machines in the cluster.
HDFS manages storage on the cluster by breaking incoming files into pieces, called “blocks,” and storing each of the blocks redundantly across the pool of servers.
The main services running in a hadoop cluster will be
1)namenode
2)jobtracker
3)secondarynamenode
These three will be running only on a single node(machine) ; that machine is the central machine which controls the cluster.
4)datanode
5)tasktracker
These two services will be running on all other nodes in the cluster.
HDFS has a master/slave architecture. An HDFS cluster consists of a single NameNode, a master server that manages the file system namespace and regulates access to files by clients. In addition, there are a number of DataNodes, usually one per node in the cluster, which manage storage attached to the nodes that they run on.
Above the file systems comes the MapReduce engine, which consists of one Job Tracker, to which client applications submit MapReduce jobs. The Job Tracker pushes work out to available Task Tracker nodes in the cluster, striving to keep the work as close to the data as possible.
The only purpose of the secondary name-node is to perform periodic checkpoints. The secondary name-node periodically downloads current name-node image and edits log files, joins them into new image and uploads the new image back to the (primary and the only) name-node.
Now Let us have a look at how to build a hadoop cluster using Cloudera hadoop-0.20 on ubuntu-10.04
You should install sun –jdk first. Then add the following repositories to the apt sources list.
vim /etc/apt/sources.list.d/cloudera.list
1
deb http://archive.cloudera.com/debian lucid-cdh3u0 contrib
2