Showing posts with label Hadoop in Standalone Mode. Show all posts
Showing posts with label Hadoop in Standalone Mode. Show all posts

Running Hadoop in Standalone Mode

This section contains instructions for Hadoop installation on ubuntu. This is Hadoop quickstart tutorial to setup Hadoop quickly. This is shortest tutorial of Hadoop installation, here you will get all the commands and their description required to install Hadoop in Standalone mode(single node cluster)


COMMAND DESCRIPTION
sudo apt-get install sun-java6-jdk Install java
if you don't have hadoop bundle download here download hadoop
sudo tar xzf file_name.tar.gz Extract hadoop bundle
vi conf/hadoop-env.sh Edit configuration file hadoop-env.sh and set JAVA_HOME:
export JAVA_HOME=path to be the root of your Java installation(eg: /usr/lib/jvm/java-6-sun)
Go your hadoop installation directory(HADOOP_HOME) and type:
bin/hadoop
This will display the usage documentation for the hadoop
Congratulations Your Hadoop Setup is Completed. Now lets run some examples
bin/hadoop jar hadoop-*-examples.jar pi 10 100 Run pi example
mkdir input
cp conf/*.xml input
bin/hadoop jar hadoop-*-examples.jar grep input output 'dfs[a-z.]+'
cat output/*
Run grep example
mkdir inputwords
cp conf/*.xml inputwords
bin/hadoop jar hadoop-*-examples.jar wordcount inputwords outputwords
run word count example
If you got any error while running examples visit Hadoop Troubleshooting