Set up Apache Hadoop running on localhost is easy. Below are the steps to follow,

0. Prerequisites
0.1 Make sure Java JDK 6 or later is installed.

Since JDK comes with Java compiler javac, we can check by issuing the following command at the terminal,

$ javac -version

On my machine, it prints the following,

javac 1.6.0_26

This means JDK 6 is installed. If the output shows javac cannot be found, then it means JDK is not installed.  To install Oracle JDK 6

$ sudo apt-get install sun-java6-jdk

or if you prefer OpenJDK,

$ sudo apt-get install openjdk-6-jdk

0.2 Make sure ssh and rsync are installed.

Note that this is not required for running Hadoop in standalone mode, but it is required for other modes.

If ssh is not installed, install it with the commands below,

$ sudo apt-get install ssh
$ sudo apt-get install rsync

1. Install Hadoop

1.1 Download a Hadoop stable release from its release page at http://hadoop.apache.org/common/releases.html#Download.

1.2 Uncompress the compressed file using the command below (replacing x.y.z to actual version number),

$ tar xvf hadoop-x.y.z.tar.gz

1.3 Add Hadoop path to environmental variable PATH. Append the following lines to the end of ~/.bashrc file.

export HADOOP_INSTALL=<hadoop root folder path>
export PATH=$PATH:$HADOOP_INSTALL/bin

1.4 Verification. Start a new terminal and type the command,

$hadoop version

This should print out the hadoop version.

2. Running Hadoop in Standalone Mode (aka local mode)

No daemon is running and everything runs in a single JVM. It is easy for testing and debugging.

2.1 Configuration. The default configuration is set for standalone mode, so we can skip to next step.

2.2 Write Hadoop MapReduce jobs and start running…

 

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Set your Twitter account name in your settings to use the TwitterBar Section.