<ahref="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduce_Compatibility_Hadoop1_Hadoop2.html">Compatibilty between Hadoop 1.x and Hadoop 2.x</a>
<ahref="http://maven.apache.org/"title="Built by Maven"class="poweredBy">
<imgalt="Built by Maven"src="./images/logos/maven-feather.png"/>
</a>
</div>
</div>
<divid="bodyColumn">
<divid="contentBox">
<!-- Licensed under the Apache License, Version 2.0 (the "License"); --><!-- you may not use this file except in compliance with the License. --><!-- You may obtain a copy of the License at --><!-- --><!-- http://www.apache.org/licenses/LICENSE-2.0 --><!-- --><!-- Unless required by applicable law or agreed to in writing, software --><!-- distributed under the License is distributed on an "AS IS" BASIS, --><!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --><!-- See the License for the specific language governing permissions and --><!-- limitations under the License. See accompanying LICENSE file. --><divclass="section">
<p>This document describes how to set up and configure a single-node Hadoop installation so that you can quickly perform simple operations using Hadoop MapReduce and the Hadoop Distributed File System (HDFS).</p></div>
<p>To get a Hadoop distribution, download a recent stable release from one of the Apache Download Mirrors.</p></div>
<divclass="section">
<h3>Prepare to Start the Hadoop Cluster<aname="Prepare_to_Start_the_Hadoop_Cluster"></a></h3>
<p>Unpack the downloaded Hadoop distribution. In the distribution, edit the file <tt>conf/hadoop-env.sh</tt> to define at least <tt>JAVA_HOME</tt> to be the root of your Java installation.</p>
<p>Try the following command:</p>
<div>
<pre>$ bin/hadoop</pre></div>
<p>This will display the usage documentation for the hadoop script.</p>
<p>Now you are ready to start your Hadoop cluster in one of the three supported modes:</p>
<p>By default, Hadoop is configured to run in a non-distributed mode, as a single Java process. This is useful for debugging.</p>
<p>The following example copies the unpacked conf directory to use as input and then finds and displays every match of the given regular expression. Output is written to the given output directory.</p>
<div>
<pre>$ mkdir input
$ cp conf/*.xml input
$ bin/hadoop jar hadoop-*-examples.jar grep input output 'dfs[a-z.]+'
<p>The hadoop daemon log output is written to the <tt>$<aname="HADOOP_LOG_DIR">HADOOP_LOG_DIR</a></tt> directory (defaults to <tt>$<aname="HADOOP_PREFIX">HADOOP_PREFIX</a>/logs</tt>).</p>
<p>Browse the web interface for the NameNode and the JobTracker; by default they are available at:</p>