hod_config_guide.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta content="Apache Forrest" name="Generator">
  6. <meta name="Forrest-version" content="0.8">
  7. <meta name="Forrest-skin-name" content="pelt">
  8. <title>
  9. HOD Configuration Guide
  10. </title>
  11. <link type="text/css" href="skin/basic.css" rel="stylesheet">
  12. <link media="screen" type="text/css" href="skin/screen.css" rel="stylesheet">
  13. <link media="print" type="text/css" href="skin/print.css" rel="stylesheet">
  14. <link type="text/css" href="skin/profile.css" rel="stylesheet">
  15. <script src="skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="skin/fontsize.js" language="javascript" type="text/javascript"></script>
  16. <link rel="shortcut icon" href="images/favicon.ico">
  17. </head>
  18. <body onload="init()">
  19. <script type="text/javascript">ndeSetTextSize();</script>
  20. <div id="top">
  21. <!--+
  22. |breadtrail
  23. +-->
  24. <div class="breadtrail">
  25. <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://hadoop.apache.org/">Hadoop</a> &gt; <a href="http://hadoop.apache.org/core/">Core</a><script src="skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
  26. </div>
  27. <!--+
  28. |header
  29. +-->
  30. <div class="header">
  31. <!--+
  32. |start group logo
  33. +-->
  34. <div class="grouplogo">
  35. <a href="http://hadoop.apache.org/"><img class="logoImage" alt="Hadoop" src="images/hadoop-logo.jpg" title="Apache Hadoop"></a>
  36. </div>
  37. <!--+
  38. |end group logo
  39. +-->
  40. <!--+
  41. |start Project Logo
  42. +-->
  43. <div class="projectlogo">
  44. <a href="http://hadoop.apache.org/core/"><img class="logoImage" alt="Hadoop" src="images/core-logo.gif" title="Scalable Computing Platform"></a>
  45. </div>
  46. <!--+
  47. |end Project Logo
  48. +-->
  49. <!--+
  50. |start Search
  51. +-->
  52. <div class="searchbox">
  53. <form action="http://www.google.com/search" method="get" class="roundtopsmall">
  54. <input value="hadoop.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp;
  55. <input name="Search" value="Search" type="submit">
  56. </form>
  57. </div>
  58. <!--+
  59. |end search
  60. +-->
  61. <!--+
  62. |start Tabs
  63. +-->
  64. <ul id="tabs">
  65. <li>
  66. <a class="unselected" href="http://hadoop.apache.org/core/">Project</a>
  67. </li>
  68. <li>
  69. <a class="unselected" href="http://wiki.apache.org/hadoop">Wiki</a>
  70. </li>
  71. <li class="current">
  72. <a class="selected" href="index.html">Hadoop 0.19 Documentation</a>
  73. </li>
  74. </ul>
  75. <!--+
  76. |end Tabs
  77. +-->
  78. </div>
  79. </div>
  80. <div id="main">
  81. <div id="publishedStrip">
  82. <!--+
  83. |start Subtabs
  84. +-->
  85. <div id="level2tabs"></div>
  86. <!--+
  87. |end Endtabs
  88. +-->
  89. <script type="text/javascript"><!--
  90. document.write("Last Published: " + document.lastModified);
  91. // --></script>
  92. </div>
  93. <!--+
  94. |breadtrail
  95. +-->
  96. <div class="breadtrail">
  97. &nbsp;
  98. </div>
  99. <!--+
  100. |start Menu, mainarea
  101. +-->
  102. <!--+
  103. |start Menu
  104. +-->
  105. <div id="menu">
  106. <div onclick="SwitchMenu('menu_selected_1.1', 'skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('skin/images/chapter_open.gif');">Documentation</div>
  107. <div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
  108. <div class="menuitem">
  109. <a href="index.html">Overview</a>
  110. </div>
  111. <div class="menuitem">
  112. <a href="quickstart.html">Hadoop Quick Start</a>
  113. </div>
  114. <div class="menuitem">
  115. <a href="cluster_setup.html">Hadoop Cluster Setup</a>
  116. </div>
  117. <div class="menuitem">
  118. <a href="mapred_tutorial.html">Hadoop Map/Reduce Tutorial</a>
  119. </div>
  120. <div class="menuitem">
  121. <a href="commands_manual.html">Hadoop Command Guide</a>
  122. </div>
  123. <div class="menuitem">
  124. <a href="hdfs_shell.html">Hadoop FS Shell Guide</a>
  125. </div>
  126. <div class="menuitem">
  127. <a href="distcp.html">Hadoop DistCp Guide</a>
  128. </div>
  129. <div class="menuitem">
  130. <a href="native_libraries.html">Hadoop Native Libraries</a>
  131. </div>
  132. <div class="menuitem">
  133. <a href="streaming.html">Hadoop Streaming</a>
  134. </div>
  135. <div class="menuitem">
  136. <a href="hadoop_archives.html">Hadoop Archives</a>
  137. </div>
  138. <div class="menuitem">
  139. <a href="hdfs_user_guide.html">HDFS User Guide</a>
  140. </div>
  141. <div class="menuitem">
  142. <a href="hdfs_design.html">HDFS Architecture</a>
  143. </div>
  144. <div class="menuitem">
  145. <a href="hdfs_permissions_guide.html">HDFS Admin Guide: Permissions</a>
  146. </div>
  147. <div class="menuitem">
  148. <a href="hdfs_quota_admin_guide.html">HDFS Admin Guide: Quotas</a>
  149. </div>
  150. <div class="menuitem">
  151. <a href="SLG_user_guide.html">HDFS Utilities</a>
  152. </div>
  153. <div class="menuitem">
  154. <a href="hod_user_guide.html">HOD User Guide</a>
  155. </div>
  156. <div class="menuitem">
  157. <a href="hod_admin_guide.html">HOD Admin Guide</a>
  158. </div>
  159. <div class="menupage">
  160. <div class="menupagetitle">HOD Config Guide</div>
  161. </div>
  162. <div class="menuitem">
  163. <a href="capacity_scheduler.html">Capacity Scheduler</a>
  164. </div>
  165. <div class="menuitem">
  166. <a href="api/index.html">API Docs</a>
  167. </div>
  168. <div class="menuitem">
  169. <a href="jdiff/changes.html">API Changes</a>
  170. </div>
  171. <div class="menuitem">
  172. <a href="http://wiki.apache.org/hadoop/">Wiki</a>
  173. </div>
  174. <div class="menuitem">
  175. <a href="http://wiki.apache.org/hadoop/FAQ">FAQ</a>
  176. </div>
  177. <div class="menuitem">
  178. <a href="releasenotes.html">Release Notes</a>
  179. </div>
  180. <div class="menuitem">
  181. <a href="changes.html">Change Log</a>
  182. </div>
  183. </div>
  184. <div id="credit"></div>
  185. <div id="roundbottom">
  186. <img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
  187. <!--+
  188. |alternative credits
  189. +-->
  190. <div id="credit2"></div>
  191. </div>
  192. <!--+
  193. |end Menu
  194. +-->
  195. <!--+
  196. |start content
  197. +-->
  198. <div id="content">
  199. <div title="Portable Document Format" class="pdflink">
  200. <a class="dida" href="hod_config_guide.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br>
  201. PDF</a>
  202. </div>
  203. <h1>
  204. HOD Configuration Guide
  205. </h1>
  206. <div id="minitoc-area">
  207. <ul class="minitoc">
  208. <li>
  209. <a href="#1.+Introduction">1. Introduction</a>
  210. </li>
  211. <li>
  212. <a href="#2.+Sections">2. Sections</a>
  213. </li>
  214. <li>
  215. <a href="#3.+HOD+Configuration+Options">3. HOD Configuration Options</a>
  216. <ul class="minitoc">
  217. <li>
  218. <a href="#3.1+Common+configuration+options">3.1 Common configuration options</a>
  219. </li>
  220. <li>
  221. <a href="#3.2+hod+options">3.2 hod options</a>
  222. </li>
  223. <li>
  224. <a href="#3.3+resource_manager+options">3.3 resource_manager options</a>
  225. </li>
  226. <li>
  227. <a href="#3.4+ringmaster+options">3.4 ringmaster options</a>
  228. </li>
  229. <li>
  230. <a href="#3.5+gridservice-hdfs+options">3.5 gridservice-hdfs options</a>
  231. </li>
  232. <li>
  233. <a href="#3.6+gridservice-mapred+options">3.6 gridservice-mapred options</a>
  234. </li>
  235. <li>
  236. <a href="#3.7+hodring+options">3.7 hodring options</a>
  237. </li>
  238. </ul>
  239. </li>
  240. </ul>
  241. </div>
  242. <a name="N1000C"></a><a name="1.+Introduction"></a>
  243. <h2 class="h3">1. Introduction</h2>
  244. <div class="section">
  245. <p>This guide discusses Hadoop on Demand (HOD) configuration sections and shows you how to work with the most important
  246. and commonly used HOD configuration options.</p>
  247. <p>Configuration options
  248. can be specified in two ways: a configuration file
  249. in the INI format, and as command line options to the HOD shell,
  250. specified in the format --section.option[=value]. If the same option is
  251. specified in both places, the value specified on the command line
  252. overrides the value in the configuration file.</p>
  253. <p>
  254. To get a simple description of all configuration options, type:
  255. </p>
  256. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  257. <tr>
  258. <td colspan="1" rowspan="1"><span class="codefrag">$ hod --verbose-help</span></td>
  259. </tr>
  260. </table>
  261. </div>
  262. <a name="N10024"></a><a name="2.+Sections"></a>
  263. <h2 class="h3">2. Sections</h2>
  264. <div class="section">
  265. <p>HOD organizes configuration options into these sections:</p>
  266. <ul>
  267. <li> hod: Options for the HOD client</li>
  268. <li> resource_manager: Options for specifying which resource manager
  269. to use, and other parameters for using that resource manager</li>
  270. <li> ringmaster: Options for the RingMaster process, </li>
  271. <li> hodring: Options for the HodRing processes</li>
  272. <li> gridservice-mapred: Options for the Map/Reduce daemons</li>
  273. <li> gridservice-hdfs: Options for the HDFS daemons.</li>
  274. </ul>
  275. </div>
  276. <a name="N10043"></a><a name="3.+HOD+Configuration+Options"></a>
  277. <h2 class="h3">3. HOD Configuration Options</h2>
  278. <div class="section">
  279. <p>The following section describes configuration options common to most
  280. HOD sections followed by sections that describe configuration options
  281. specific to each HOD section.</p>
  282. <a name="N1004C"></a><a name="3.1+Common+configuration+options"></a>
  283. <h3 class="h4">3.1 Common configuration options</h3>
  284. <p>Certain configuration options are defined in most of the sections of
  285. the HOD configuration. Options defined in a section, are used by the
  286. process for which that section applies. These options have the same
  287. meaning, but can have different values in each section.
  288. </p>
  289. <ul>
  290. <li>temp-dir: Temporary directory for usage by the HOD processes. Make
  291. sure that the users who will run hod have rights to create
  292. directories under the directory specified here. If you
  293. wish to make this directory vary across allocations,
  294. you can make use of the environmental variables which will
  295. be made available by the resource manager to the HOD
  296. processes. For example, in a Torque setup, having
  297. --ringmaster.temp-dir=/tmp/hod-temp-dir.$PBS_JOBID would
  298. let ringmaster use different temp-dir for each
  299. allocation; Torque expands this variable before starting
  300. the ringmaster.</li>
  301. <li>debug: Numeric value from 1-4. 4 produces the most log information,
  302. and 1 the least.</li>
  303. <li>log-dir: Directory where log files are stored. By default, this is
  304. &lt;install-location&gt;/logs/. The restrictions and notes for the
  305. temp-dir variable apply here too.
  306. </li>
  307. <li>xrs-port-range: Range of ports, among which an available port shall
  308. be picked for use to run an XML-RPC server.</li>
  309. <li>http-port-range: Range of ports, among which an available port shall
  310. be picked for use to run an HTTP server.</li>
  311. <li>java-home: Location of Java to be used by Hadoop.</li>
  312. <li>syslog-address: Address to which a syslog daemon is bound to. The format
  313. of the value is host:port. If configured, HOD log messages
  314. will be logged to syslog using this value.</li>
  315. </ul>
  316. <a name="N1006E"></a><a name="3.2+hod+options"></a>
  317. <h3 class="h4">3.2 hod options</h3>
  318. <ul>
  319. <li>cluster: Descriptive name given to the cluster. For Torque, this is
  320. specified as a 'Node property' for every node in the cluster.
  321. HOD uses this value to compute the number of available nodes.</li>
  322. <li>client-params: Comma-separated list of hadoop config parameters
  323. specified as key-value pairs. These will be used to
  324. generate a hadoop-site.xml on the submit node that
  325. should be used for running Map/Reduce jobs.</li>
  326. <li>job-feasibility-attr: Regular expression string that specifies
  327. whether and how to check job feasibility - resource
  328. manager or scheduler limits. The current
  329. implementation corresponds to the torque job
  330. attribute 'comment' and by default is disabled.
  331. When set, HOD uses it to decide what type
  332. of limit violation is triggered and either
  333. deallocates the cluster or stays in queued state
  334. according as the request is beyond maximum limits or
  335. the cumulative usage has crossed maximum limits.
  336. The torque comment attribute may be updated
  337. periodically by an external mechanism. For example,
  338. comment attribute can be updated by running <a href="hod_admin_guide.html#checklimits.sh+-+Tool+to+update+torque+comment+field+reflecting+resource+limits">
  339. checklimits.sh</a> script in hod/support directory,
  340. and then setting job-feasibility-attr equal to the
  341. value TORQUE_USER_LIMITS_COMMENT_FIELD,
  342. "User-limits exceeded. Requested:([0-9]*)
  343. Used:([0-9]*) MaxLimit:([0-9]*)", will make HOD
  344. behave accordingly.
  345. </li>
  346. </ul>
  347. <a name="N10085"></a><a name="3.3+resource_manager+options"></a>
  348. <h3 class="h4">3.3 resource_manager options</h3>
  349. <ul>
  350. <li>queue: Name of the queue configured in the resource manager to which
  351. jobs are to be submitted.</li>
  352. <li>batch-home: Install directory to which 'bin' is appended and under
  353. which the executables of the resource manager can be
  354. found.</li>
  355. <li>env-vars: Comma-separated list of key-value pairs,
  356. expressed as key=value, which would be passed to the jobs
  357. launched on the compute nodes.
  358. For example, if the python installation is
  359. in a non-standard location, one can set the environment
  360. variable 'HOD_PYTHON_HOME' to the path to the python
  361. executable. The HOD processes launched on the compute nodes
  362. can then use this variable.</li>
  363. <li>options: Comma-separated list of key-value pairs,
  364. expressed as
  365. &lt;option&gt;:&lt;sub-option&gt;=&lt;value&gt;. When
  366. passing to the job submission program, these are expanded
  367. as -&lt;option&gt; &lt;sub-option&gt;=&lt;value&gt;. These
  368. are generally used for specifying additional resource
  369. contraints for scheduling. For instance, with a Torque
  370. setup, one can specify
  371. --resource_manager.options='l:arch=x86_64' for
  372. constraining the nodes being allocated to a particular
  373. architecture; this option will be passed to Torque's qsub
  374. command as "-l arch=x86_64".</li>
  375. </ul>
  376. <a name="N1009B"></a><a name="3.4+ringmaster+options"></a>
  377. <h3 class="h4">3.4 ringmaster options</h3>
  378. <ul>
  379. <li>work-dirs: Comma-separated list of paths that will serve
  380. as the root for directories that HOD generates and passes
  381. to Hadoop for use to store DFS and Map/Reduce data. For
  382. example,
  383. this is where DFS data blocks will be stored. Typically,
  384. as many paths are specified as there are disks available
  385. to ensure all disks are being utilized. The restrictions
  386. and notes for the temp-dir variable apply here too.</li>
  387. <li>max-master-failures: Number of times a hadoop master
  388. daemon can fail to launch, beyond which HOD will fail
  389. the cluster allocation altogether. In HOD clusters,
  390. sometimes there might be a single or few "bad" nodes due
  391. to issues like missing java, missing or incorrect version
  392. of Hadoop etc. When this configuration variable is set
  393. to a positive integer, the RingMaster returns an error
  394. to the client only when the number of times a hadoop
  395. master (JobTracker or NameNode) fails to start on these
  396. bad nodes because of above issues, exceeds the specified
  397. value. If the number is not exceeded, the next HodRing
  398. which requests for a command to launch is given the same
  399. hadoop master again. This way, HOD tries its best for a
  400. successful allocation even in the presence of a few bad
  401. nodes in the cluster.
  402. </li>
  403. <li>workers_per_ring: Number of workers per service per HodRing.
  404. By default this is set to 1. If this configuration
  405. variable is set to a value 'n', the HodRing will run
  406. 'n' instances of the workers (TaskTrackers or DataNodes)
  407. on each node acting as a slave. This can be used to run
  408. multiple workers per HodRing, so that the total number of
  409. workers in a HOD cluster is not limited by the total
  410. number of nodes requested during allocation. However, note
  411. that this will mean each worker should be configured to use
  412. only a proportional fraction of the capacity of the
  413. resources on the node. In general, this feature is only
  414. useful for testing and simulation purposes, and not for
  415. production use.</li>
  416. </ul>
  417. <a name="N100AE"></a><a name="3.5+gridservice-hdfs+options"></a>
  418. <h3 class="h4">3.5 gridservice-hdfs options</h3>
  419. <ul>
  420. <li>external: If false, indicates that a HDFS cluster must be
  421. bought up by the HOD system, on the nodes which it
  422. allocates via the allocate command. Note that in that case,
  423. when the cluster is de-allocated, it will bring down the
  424. HDFS cluster, and all the data will be lost.
  425. If true, it will try and connect to an externally configured
  426. HDFS system.
  427. Typically, because input for jobs are placed into HDFS
  428. before jobs are run, and also the output from jobs in HDFS
  429. is required to be persistent, an internal HDFS cluster is
  430. of little value in a production system. However, it allows
  431. for quick testing.</li>
  432. <li>host: Hostname of the externally configured NameNode, if any</li>
  433. <li>fs_port: Port to which NameNode RPC server is bound.</li>
  434. <li>info_port: Port to which the NameNode web UI server is bound.</li>
  435. <li>pkgs: Installation directory, under which bin/hadoop executable is
  436. located. This can be used to use a pre-installed version of
  437. Hadoop on the cluster.</li>
  438. <li>server-params: Comma-separated list of hadoop config parameters
  439. specified key-value pairs. These will be used to
  440. generate a hadoop-site.xml that will be used by the
  441. NameNode and DataNodes.</li>
  442. <li>final-server-params: Same as above, except they will be marked final.</li>
  443. </ul>
  444. <a name="N100CD"></a><a name="3.6+gridservice-mapred+options"></a>
  445. <h3 class="h4">3.6 gridservice-mapred options</h3>
  446. <ul>
  447. <li>external: If false, indicates that a Map/Reduce cluster must be
  448. bought up by the HOD system on the nodes which it allocates
  449. via the allocate command.
  450. If true, if will try and connect to an externally
  451. configured Map/Reduce system.</li>
  452. <li>host: Hostname of the externally configured JobTracker, if any</li>
  453. <li>tracker_port: Port to which the JobTracker RPC server is bound</li>
  454. <li>info_port: Port to which the JobTracker web UI server is bound.</li>
  455. <li>pkgs: Installation directory, under which bin/hadoop executable is
  456. located</li>
  457. <li>server-params: Comma-separated list of hadoop config parameters
  458. specified key-value pairs. These will be used to
  459. generate a hadoop-site.xml that will be used by the
  460. JobTracker and TaskTrackers</li>
  461. <li>final-server-params: Same as above, except they will be marked final.</li>
  462. </ul>
  463. <a name="N100EC"></a><a name="3.7+hodring+options"></a>
  464. <h3 class="h4">3.7 hodring options</h3>
  465. <ul>
  466. <li>mapred-system-dir-root: Directory in the DFS under which HOD will
  467. generate sub-directory names and pass the full path
  468. as the value of the 'mapred.system.dir' configuration
  469. parameter to Hadoop daemons. The format of the full
  470. path will be value-of-this-option/userid/mapredsystem/cluster-id.
  471. Note that the directory specified here should be such
  472. that all users can create directories under this, if
  473. permissions are enabled in HDFS. Setting the value of
  474. this option to /user will make HOD use the user's
  475. home directory to generate the mapred.system.dir value.</li>
  476. <li>log-destination-uri: URL describing a path in an external, static DFS or the
  477. cluster node's local file system where HOD will upload
  478. Hadoop logs when a cluster is deallocated. To specify a
  479. DFS path, use the format 'hdfs://path'. To specify a
  480. cluster node's local file path, use the format 'file://path'.
  481. When clusters are deallocated by HOD, the hadoop logs will
  482. be deleted as part of HOD's cleanup process. To ensure these
  483. logs persist, you can use this configuration option.
  484. The format of the path is
  485. value-of-this-option/userid/hod-logs/cluster-id
  486. Note that the directory you specify here must be such that all
  487. users can create sub-directories under this. Setting this value
  488. to hdfs://user will make the logs come in the user's home directory
  489. in DFS.</li>
  490. <li>pkgs: Installation directory, under which bin/hadoop executable is located. This will
  491. be used by HOD to upload logs if a HDFS URL is specified in log-destination-uri
  492. option. Note that this is useful if the users are using a tarball whose version
  493. may differ from the external, static HDFS version.</li>
  494. </ul>
  495. </div>
  496. </div>
  497. <!--+
  498. |end content
  499. +-->
  500. <div class="clearboth">&nbsp;</div>
  501. </div>
  502. <div id="footer">
  503. <!--+
  504. |start bottomstrip
  505. +-->
  506. <div class="lastmodified">
  507. <script type="text/javascript"><!--
  508. document.write("Last Published: " + document.lastModified);
  509. // --></script>
  510. </div>
  511. <div class="copyright">
  512. Copyright &copy;
  513. 2008 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
  514. </div>
  515. <!--+
  516. |end bottomstrip
  517. +-->
  518. </div>
  519. </body>
  520. </html>