diff --git a/hadoop-common-project/hadoop-common/src/site/markdown/CLIMiniCluster.md.vm b/hadoop-common-project/hadoop-common/src/site/markdown/CLIMiniCluster.md.vm index 806df0a41d..9aa9ad2ef1 100644 --- a/hadoop-common-project/hadoop-common/src/site/markdown/CLIMiniCluster.md.vm +++ b/hadoop-common-project/hadoop-common/src/site/markdown/CLIMiniCluster.md.vm @@ -41,7 +41,7 @@ Running the MiniCluster From inside the root directory of the extracted tarball, you can start the CLI MiniCluster using the following command: - $ HADOOP_CLASSPATH=share/hadoop/yarn/test/hadoop-yarn-server-tests-${project.version}-tests.jar bin/hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-${project.version}-tests.jar minicluster -rmport RM_PORT -jhsport JHS_PORT + $ bin/mapred minicluster -rmport RM_PORT -jhsport JHS_PORT In the example command above, `RM_PORT` and `JHS_PORT` should be replaced by the user's choice of these port numbers. If not specified, random free ports will be used. diff --git a/hadoop-mapreduce-project/bin/mapred b/hadoop-mapreduce-project/bin/mapred index 44f6216443..9773ec89de 100755 --- a/hadoop-mapreduce-project/bin/mapred +++ b/hadoop-mapreduce-project/bin/mapred @@ -36,6 +36,7 @@ function hadoop_usage hadoop_add_subcommand "sampler" client "sampler" hadoop_add_subcommand "frameworkuploader" admin "mapreduce framework upload" hadoop_add_subcommand "version" client "print the version" + hadoop_add_subcommand "minicluster" client "CLI MiniCluster" hadoop_generate_usage "${HADOOP_SHELL_EXECNAME}" true } @@ -101,6 +102,11 @@ function mapredcmd_case version) HADOOP_CLASSNAME=org.apache.hadoop.util.VersionInfo ;; + minicluster) + hadoop_add_classpath "${HADOOP_YARN_HOME}/${YARN_DIR}/timelineservice"'/*' + hadoop_add_classpath "${HADOOP_YARN_HOME}/${YARN_DIR}/test"'/*' + HADOOP_CLASSNAME=org.apache.hadoop.mapreduce.MiniHadoopClusterManager + ;; *) HADOOP_CLASSNAME="${subcmd}" if ! hadoop_validate_classname "${HADOOP_CLASSNAME}"; then