<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">
<h2>Hadoop MapReduce Next Generation - CLI MiniCluster.<aname="Hadoop_MapReduce_Next_Generation_-_CLI_MiniCluster."></a></h2>
<ul>
<li><ahref="#Hadoop_MapReduce_Next_Generation_-_CLI_MiniCluster.">Hadoop MapReduce Next Generation - CLI MiniCluster.</a>
<li><ahref="#Running_the_MiniCluster">Running the MiniCluster</a></li></ul></li></ul>
<divclass="section">
<h3><aname="Purpose">Purpose</a></h3>
<p>Using the CLI MiniCluster, users can simply start and stop a single-node Hadoop cluster with a single command, and without the need to set any environment variables or manage configuration files. The CLI MiniCluster starts both a <tt>YARN</tt>/<tt>MapReduce</tt>&<tt>HDFS</tt> clusters.</p>
<p>This is useful for cases where users want to quickly experiment with a real Hadoop cluster or test non-Java programs that rely on significant Hadoop functionality.</p></div>
<p><b>NOTE:</b> You will need <aclass="externalLink"href="http://code.google.com/p/protobuf/">protoc 2.5.0</a> installed.</p>
<p>The tarball should be available in <tt>hadoop-dist/target/</tt> directory. </p></div>
<divclass="section">
<h3><aname="Running_the_MiniCluster">Running the MiniCluster</a></h3>
<p>From inside the root directory of the extracted tarball, you can start the CLI MiniCluster using the following command:</p>
<divclass="source">
<pre>$ bin/hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.3.0-tests.jar minicluster -rmport RM_PORT -jhsport JHS_PORT</pre></div>
<p>In the example command above, <tt>RM_PORT</tt> and <tt>JHS_PORT</tt> should be replaced by the user's choice of these port numbers. If not specified, random free ports will be used.</p>
<p>There are a number of command line arguments that the users can use to control which services to start, and to pass other configuration properties. The available command line arguments:</p>
<divclass="source">
<pre>$ -D <property=value> Options to pass into configuration object
$ -datanodes <arg> How many datanodes to start (default 1)
$ -format Format the DFS (default false)
$ -help Prints option help.
$ -jhsport <arg> JobHistoryServer port (default 0--we choose)
$ -namenode <arg> URL of the namenode (default is either the DFS
$ cluster or a temporary dir)
$ -nnport <arg> NameNode port (default 0--we choose)
$ -nodemanagers <arg> How many nodemanagers to start (default 1)
$ -nodfs Don't start a mini DFS cluster
$ -nomr Don't start a mini MR cluster
$ -rmport <arg> ResourceManager port (default 0--we choose)
$ -writeConfig <path> Save configuration to this XML file.
$ -writeDetails <path> Write basic information to this JSON file.</pre></div>
<p>To display this full list of available arguments, the user can pass the <tt>-help</tt> argument to the above command.</p></div></div>