CLIMiniCluster.apt.vm 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ~~ Licensed under the Apache License, Version 2.0 (the "License");
  2. ~~ you may not use this file except in compliance with the License.
  3. ~~ You may obtain a copy of the License at
  4. ~~
  5. ~~ http://www.apache.org/licenses/LICENSE-2.0
  6. ~~
  7. ~~ Unless required by applicable law or agreed to in writing, software
  8. ~~ distributed under the License is distributed on an "AS IS" BASIS,
  9. ~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. ~~ See the License for the specific language governing permissions and
  11. ~~ limitations under the License. See accompanying LICENSE file.
  12. ---
  13. Hadoop MapReduce Next Generation ${project.version} - CLI MiniCluster.
  14. ---
  15. ---
  16. ${maven.build.timestamp}
  17. Hadoop MapReduce Next Generation - CLI MiniCluster.
  18. %{toc|section=1|fromDepth=0}
  19. * {Purpose}
  20. Using the CLI MiniCluster, users can simply start and stop a single-node
  21. Hadoop cluster with a single command, and without the need to set any
  22. environment variables or manage configuration files. The CLI MiniCluster
  23. starts both a <<<YARN>>>/<<<MapReduce>>> & <<<HDFS>>> clusters.
  24. This is useful for cases where users want to quickly experiment with a real
  25. Hadoop cluster or test non-Java programs that rely on significant Hadoop
  26. functionality.
  27. * {Hadoop Tarball}
  28. You should be able to obtain the Hadoop tarball from the release. Also, you
  29. can directly create a tarball from the source:
  30. +---+
  31. $ mvn clean install -DskipTests
  32. $ mvn package -Pdist -Dtar -DskipTests -Dmaven.javadoc.skip
  33. +---+
  34. <<NOTE:>> You will need {{{http://code.google.com/p/protobuf/}protoc 2.5.0}}
  35. installed.
  36. The tarball should be available in <<<hadoop-dist/target/>>> directory.
  37. * {Running the MiniCluster}
  38. From inside the root directory of the extracted tarball, you can start the CLI
  39. MiniCluster using the following command:
  40. +---+
  41. $ bin/hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-${project.version}-tests.jar minicluster -rmport RM_PORT -jhsport JHS_PORT
  42. +---+
  43. In the example command above, <<<RM_PORT>>> and <<<JHS_PORT>>> should be
  44. replaced by the user's choice of these port numbers. If not specified, random
  45. free ports will be used.
  46. There are a number of command line arguments that the users can use to control
  47. which services to start, and to pass other configuration properties.
  48. The available command line arguments:
  49. +---+
  50. $ -D <property=value> Options to pass into configuration object
  51. $ -datanodes <arg> How many datanodes to start (default 1)
  52. $ -format Format the DFS (default false)
  53. $ -help Prints option help.
  54. $ -jhsport <arg> JobHistoryServer port (default 0--we choose)
  55. $ -namenode <arg> URL of the namenode (default is either the DFS
  56. $ cluster or a temporary dir)
  57. $ -nnport <arg> NameNode port (default 0--we choose)
  58. $ -nodemanagers <arg> How many nodemanagers to start (default 1)
  59. $ -nodfs Don't start a mini DFS cluster
  60. $ -nomr Don't start a mini MR cluster
  61. $ -rmport <arg> ResourceManager port (default 0--we choose)
  62. $ -writeConfig <path> Save configuration to this XML file.
  63. $ -writeDetails <path> Write basic information to this JSON file.
  64. +---+
  65. To display this full list of available arguments, the user can pass the
  66. <<<-help>>> argument to the above command.