hod_admin_guide.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  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. Hadoop On Demand
  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.18 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_1.1', 'skin/')" id="menu_1.1Title" class="menutitle">Documentation</div>
  107. <div id="menu_1.1" class="menuitemgroup">
  108. <div class="menuitem">
  109. <a href="index.html">Overview</a>
  110. </div>
  111. <div class="menuitem">
  112. <a href="quickstart.html">Quickstart</a>
  113. </div>
  114. <div class="menuitem">
  115. <a href="cluster_setup.html">Cluster Setup</a>
  116. </div>
  117. <div class="menuitem">
  118. <a href="hdfs_design.html">HDFS Architecture</a>
  119. </div>
  120. <div class="menuitem">
  121. <a href="hdfs_user_guide.html">HDFS User Guide</a>
  122. </div>
  123. <div class="menuitem">
  124. <a href="hdfs_permissions_guide.html">HDFS Permissions Guide</a>
  125. </div>
  126. <div class="menuitem">
  127. <a href="hdfs_quota_admin_guide.html">HDFS Quotas Administrator Guide</a>
  128. </div>
  129. <div class="menuitem">
  130. <a href="hdfs_shell.html">FS Shell Guide</a>
  131. </div>
  132. <div class="menuitem">
  133. <a href="mapred_tutorial.html">Map-Reduce Tutorial</a>
  134. </div>
  135. <div class="menuitem">
  136. <a href="native_libraries.html">Native Hadoop Libraries</a>
  137. </div>
  138. <div class="menuitem">
  139. <a href="streaming.html">Streaming</a>
  140. </div>
  141. <div class="menuitem">
  142. <a href="hod.html">Hadoop On Demand</a>
  143. </div>
  144. <div class="menuitem">
  145. <a href="api/index.html">API Docs</a>
  146. </div>
  147. <div class="menuitem">
  148. <a href="http://wiki.apache.org/hadoop/">Wiki</a>
  149. </div>
  150. <div class="menuitem">
  151. <a href="http://wiki.apache.org/hadoop/FAQ">FAQ</a>
  152. </div>
  153. <div class="menuitem">
  154. <a href="http://hadoop.apache.org/core/mailing_lists.html">Mailing Lists</a>
  155. </div>
  156. <div class="menuitem">
  157. <a href="releasenotes.html">Release Notes</a>
  158. </div>
  159. <div class="menuitem">
  160. <a href="changes.html">All Changes</a>
  161. </div>
  162. </div>
  163. <div id="credit"></div>
  164. <div id="roundbottom">
  165. <img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
  166. <!--+
  167. |alternative credits
  168. +-->
  169. <div id="credit2"></div>
  170. </div>
  171. <!--+
  172. |end Menu
  173. +-->
  174. <!--+
  175. |start content
  176. +-->
  177. <div id="content">
  178. <div title="Portable Document Format" class="pdflink">
  179. <a class="dida" href="hod_admin_guide.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br>
  180. PDF</a>
  181. </div>
  182. <h1>
  183. Hadoop On Demand
  184. </h1>
  185. <div id="minitoc-area">
  186. <ul class="minitoc">
  187. <li>
  188. <a href="#Overview">Overview</a>
  189. </li>
  190. <li>
  191. <a href="#Pre-requisites">Pre-requisites</a>
  192. </li>
  193. <li>
  194. <a href="#Resource+Manager">Resource Manager</a>
  195. </li>
  196. <li>
  197. <a href="#Installing+HOD">Installing HOD</a>
  198. </li>
  199. <li>
  200. <a href="#Configuring+HOD">Configuring HOD</a>
  201. <ul class="minitoc">
  202. <li>
  203. <a href="#Minimal+Configuration+to+get+started">Minimal Configuration to get started</a>
  204. </li>
  205. <li>
  206. <a href="#Advanced+Configuration">Advanced Configuration</a>
  207. </li>
  208. </ul>
  209. </li>
  210. <li>
  211. <a href="#Running+HOD">Running HOD</a>
  212. </li>
  213. <li>
  214. <a href="#Supporting+Tools+and+Utilities">Supporting Tools and Utilities</a>
  215. <ul class="minitoc">
  216. <li>
  217. <a href="#logcondense.py+-+Tool+for+removing+log+files+uploaded+to+DFS">logcondense.py - Tool for removing log files uploaded to DFS</a>
  218. <ul class="minitoc">
  219. <li>
  220. <a href="#Running+logcondense.py">Running logcondense.py</a>
  221. </li>
  222. <li>
  223. <a href="#Command+Line+Options+for+logcondense.py">Command Line Options for logcondense.py</a>
  224. </li>
  225. </ul>
  226. </li>
  227. <li>
  228. <a href="#checklimits.sh+-+Tool+to+update+torque+comment+field+reflecting+resource+limits">checklimits.sh - Tool to update torque comment field reflecting resource limits</a>
  229. <ul class="minitoc">
  230. <li>
  231. <a href="#Running+checklimits.sh">Running checklimits.sh</a>
  232. </li>
  233. </ul>
  234. </li>
  235. </ul>
  236. </li>
  237. </ul>
  238. </div>
  239. <a name="N1000C"></a><a name="Overview"></a>
  240. <h2 class="h3">Overview</h2>
  241. <div class="section">
  242. <p>The Hadoop On Demand (HOD) project is a system for provisioning and
  243. managing independent Hadoop MapReduce and HDFS instances on a shared cluster
  244. of nodes. HOD is a tool that makes it easy for administrators and users to
  245. quickly setup and use Hadoop. It is also a very useful tool for Hadoop developers
  246. and testers who need to share a physical cluster for testing their own Hadoop
  247. versions.
  248. </p>
  249. <p>HOD relies on a resource manager (RM) for allocation of nodes that it can use for
  250. running Hadoop instances. At present it runs with the <a href="http://www.clusterresources.com/pages/products/torque-resource-manager.php">Torque
  251. resource manager</a>.
  252. </p>
  253. <p>
  254. The basic system architecture of HOD includes components from:</p>
  255. <ul>
  256. <li>A Resource manager (possibly together with a scheduler),</li>
  257. <li>HOD components, and </li>
  258. <li>Hadoop Map/Reduce and HDFS daemons.</li>
  259. </ul>
  260. <p>
  261. HOD provisions and maintains Hadoop Map/Reduce and, optionally, HDFS instances
  262. through interaction with the above components on a given cluster of nodes. A cluster of
  263. nodes can be thought of as comprising of two sets of nodes:</p>
  264. <ul>
  265. <li>Submit nodes: Users use the HOD client on these nodes to allocate clusters, and then
  266. use the Hadoop client to submit Hadoop jobs. </li>
  267. <li>Compute nodes: Using the resource manager, HOD components are run on these nodes to
  268. provision the Hadoop daemons. After that Hadoop jobs run on them.</li>
  269. </ul>
  270. <p>
  271. Here is a brief description of the sequence of operations in allocating a cluster and
  272. running jobs on them.
  273. </p>
  274. <ul>
  275. <li>The user uses the HOD client on the Submit node to allocate a required number of
  276. cluster nodes, and provision Hadoop on them.</li>
  277. <li>The HOD client uses a Resource Manager interface, (qsub, in Torque), to submit a HOD
  278. process, called the RingMaster, as a Resource Manager job, requesting the user desired number
  279. of nodes. This job is submitted to the central server of the Resource Manager (pbs_server, in Torque).</li>
  280. <li>On the compute nodes, the resource manager slave daemons, (pbs_moms in Torque), accept
  281. and run jobs that they are given by the central server (pbs_server in Torque). The RingMaster
  282. process is started on one of the compute nodes (mother superior, in Torque).</li>
  283. <li>The Ringmaster then uses another Resource Manager interface, (pbsdsh, in Torque), to run
  284. the second HOD component, HodRing, as distributed tasks on each of the compute
  285. nodes allocated.</li>
  286. <li>The Hodrings, after initializing, communicate with the Ringmaster to get Hadoop commands,
  287. and run them accordingly. Once the Hadoop commands are started, they register with the RingMaster,
  288. giving information about the daemons.</li>
  289. <li>All the configuration files needed for Hadoop instances are generated by HOD itself,
  290. some obtained from options given by user in its own configuration file.</li>
  291. <li>The HOD client keeps communicating with the RingMaster to find out the location of the
  292. JobTracker and HDFS daemons.</li>
  293. </ul>
  294. <p>The rest of the document deals with the steps needed to setup HOD on a physical cluster of nodes.</p>
  295. </div>
  296. <a name="N10056"></a><a name="Pre-requisites"></a>
  297. <h2 class="h3">Pre-requisites</h2>
  298. <div class="section">
  299. <p>Operating System: HOD is currently tested on RHEL4.<br>
  300. Nodes : HOD requires a minimum of 3 nodes configured through a resource manager.<br>
  301. </p>
  302. <p> Software </p>
  303. <p>The following components are to be installed on *ALL* the nodes before using HOD:</p>
  304. <ul>
  305. <li>Torque: Resource manager</li>
  306. <li>
  307. <a href="http://www.python.org">Python</a> : HOD requires version 2.5.1 of Python.</li>
  308. </ul>
  309. <p>The following components can be optionally installed for getting better
  310. functionality from HOD:</p>
  311. <ul>
  312. <li>
  313. <a href="http://twistedmatrix.com/trac/">Twisted Python</a>: This can be
  314. used for improving the scalability of HOD. If this module is detected to be
  315. installed, HOD uses it, else it falls back to default modules.</li>
  316. <li>
  317. <a href="http://hadoop.apache.org/core/">Hadoop</a>: HOD can automatically
  318. distribute Hadoop to all nodes in the cluster. However, it can also use a
  319. pre-installed version of Hadoop, if it is available on all nodes in the cluster.
  320. HOD currently supports Hadoop 0.15 and above.</li>
  321. </ul>
  322. <p>NOTE: HOD configuration requires the location of installs of these
  323. components to be the same on all nodes in the cluster. It will also
  324. make the configuration simpler to have the same location on the submit
  325. nodes.
  326. </p>
  327. </div>
  328. <a name="N1008A"></a><a name="Resource+Manager"></a>
  329. <h2 class="h3">Resource Manager</h2>
  330. <div class="section">
  331. <p> Currently HOD works with the Torque resource manager, which it uses for its node
  332. allocation and job submission. Torque is an open source resource manager from
  333. <a href="http://www.clusterresources.com">Cluster Resources</a>, a community effort
  334. based on the PBS project. It provides control over batch jobs and distributed compute nodes. Torque is
  335. freely available for download from <a href="http://www.clusterresources.com/downloads/torque/">here</a>.
  336. </p>
  337. <p> All documentation related to torque can be seen under
  338. the section TORQUE Resource Manager <a href="http://www.clusterresources.com/pages/resources/documentation.php">here</a>. You can
  339. get wiki documentation from <a href="http://www.clusterresources.com/wiki/doku.php?id=torque:torque_wiki">here</a>.
  340. Users may wish to subscribe to TORQUE&rsquo;s mailing list or view the archive for questions,
  341. comments <a href="http://www.clusterresources.com/pages/resources/mailing-lists.php">here</a>.
  342. </p>
  343. <p>For using HOD with Torque:</p>
  344. <ul>
  345. <li>Install Torque components: pbs_server on one node(head node), pbs_mom on all
  346. compute nodes, and PBS client tools on all compute nodes and submit
  347. nodes. Perform atleast a basic configuration so that the Torque system is up and
  348. running i.e pbs_server knows which machines to talk to. Look <a href="http://www.clusterresources.com/wiki/doku.php?id=torque:1.2_basic_configuration">here</a>
  349. for basic configuration.
  350. For advanced configuration, see <a href="http://www.clusterresources.com/wiki/doku.php?id=torque:1.3_advanced_configuration">here</a>
  351. </li>
  352. <li>Create a queue for submitting jobs on the pbs_server. The name of the queue is the
  353. same as the HOD configuration parameter, resource-manager.queue. The Hod client uses this queue to
  354. submit the Ringmaster process as a Torque job.</li>
  355. <li>Specify a 'cluster name' as a 'property' for all nodes in the cluster.
  356. This can be done by using the 'qmgr' command. For example:
  357. qmgr -c "set node node properties=cluster-name". The name of the cluster is the same as
  358. the HOD configuration parameter, hod.cluster. </li>
  359. <li>Ensure that jobs can be submitted to the nodes. This can be done by
  360. using the 'qsub' command. For example:
  361. echo "sleep 30" | qsub -l nodes=3</li>
  362. </ul>
  363. </div>
  364. <a name="N100C4"></a><a name="Installing+HOD"></a>
  365. <h2 class="h3">Installing HOD</h2>
  366. <div class="section">
  367. <p>Now that the resource manager set up is done, we proceed on to obtaining and
  368. installing HOD.</p>
  369. <ul>
  370. <li>If you are getting HOD from the Hadoop tarball,it is available under the
  371. 'contrib' section of Hadoop, under the root directory 'hod'.</li>
  372. <li>If you are building from source, you can run ant tar from the Hadoop root
  373. directory, to generate the Hadoop tarball, and then pick HOD from there,
  374. as described in the point above.</li>
  375. <li>Distribute the files under this directory to all the nodes in the
  376. cluster. Note that the location where the files are copied should be
  377. the same on all the nodes.</li>
  378. <li>Note that compiling hadoop would build HOD with appropriate permissions
  379. set on all the required script files in HOD.</li>
  380. </ul>
  381. </div>
  382. <a name="N100DD"></a><a name="Configuring+HOD"></a>
  383. <h2 class="h3">Configuring HOD</h2>
  384. <div class="section">
  385. <p>After HOD installation is done, it has to be configured before we start using
  386. it.</p>
  387. <a name="N100E6"></a><a name="Minimal+Configuration+to+get+started"></a>
  388. <h3 class="h4">Minimal Configuration to get started</h3>
  389. <ul>
  390. <li>On the node from where you want to run hod, edit the file hodrc
  391. which can be found in the &lt;install dir&gt;/conf directory. This file
  392. contains the minimal set of values required for running hod.</li>
  393. <li>
  394. <p>Specify values suitable to your environment for the following
  395. variables defined in the configuration file. Note that some of these
  396. variables are defined at more than one place in the file.</p>
  397. <ul>
  398. <li>${JAVA_HOME}: Location of Java for Hadoop. Hadoop supports Sun JDK
  399. 1.5.x and above.</li>
  400. <li>${CLUSTER_NAME}: Name of the cluster which is specified in the
  401. 'node property' as mentioned in resource manager configuration.</li>
  402. <li>${HADOOP_HOME}: Location of Hadoop installation on the compute and
  403. submit nodes.</li>
  404. <li>${RM_QUEUE}: Queue configured for submiting jobs in the resource
  405. manager configuration.</li>
  406. <li>${RM_HOME}: Location of the resource manager installation on the
  407. compute and submit nodes.</li>
  408. </ul>
  409. </li>
  410. <li>
  411. <p>The following environment variables *may* need to be set depending on
  412. your environment. These variables must be defined where you run the
  413. HOD client, and also be specified in the HOD configuration file as the
  414. value of the key resource_manager.env-vars. Multiple variables can be
  415. specified as a comma separated list of key=value pairs.</p>
  416. <ul>
  417. <li>HOD_PYTHON_HOME: If you install python to a non-default location
  418. of the compute nodes, or submit nodes, then, this variable must be
  419. defined to point to the python executable in the non-standard
  420. location.</li>
  421. </ul>
  422. </li>
  423. </ul>
  424. <a name="N10117"></a><a name="Advanced+Configuration"></a>
  425. <h3 class="h4">Advanced Configuration</h3>
  426. <p> You can review other configuration options in the file and modify them to suit
  427. your needs. Refer to the <a href="hod_config_guide.html">Configuration Guide</a> for information about the HOD
  428. configuration.
  429. </p>
  430. </div>
  431. <a name="N10126"></a><a name="Running+HOD"></a>
  432. <h2 class="h3">Running HOD</h2>
  433. <div class="section">
  434. <p>You can now proceed to <a href="hod_user_guide.html">HOD User Guide</a> for information about how to run HOD,
  435. what are the various features, options and for help in trouble-shooting.</p>
  436. </div>
  437. <a name="N10134"></a><a name="Supporting+Tools+and+Utilities"></a>
  438. <h2 class="h3">Supporting Tools and Utilities</h2>
  439. <div class="section">
  440. <p>This section describes certain supporting tools and utilities that can be used in managing HOD deployments.</p>
  441. <a name="N1013D"></a><a name="logcondense.py+-+Tool+for+removing+log+files+uploaded+to+DFS"></a>
  442. <h3 class="h4">logcondense.py - Tool for removing log files uploaded to DFS</h3>
  443. <p>As mentioned in
  444. <a href="hod_user_guide.html#Collecting+and+Viewing+Hadoop+Logs">this section</a> of the
  445. <a href="hod_user_guide.html">HOD User Guide</a>, HOD can be configured to upload
  446. Hadoop logs to a statically configured HDFS. Over time, the number of logs uploaded
  447. to DFS could increase. logcondense.py is a tool that helps administrators to clean-up
  448. the log files older than a certain number of days. </p>
  449. <a name="N1014E"></a><a name="Running+logcondense.py"></a>
  450. <h4>Running logcondense.py</h4>
  451. <p>logcondense.py is available under hod_install_location/support folder. You can either
  452. run it using python, for e.g. <em>python logcondense.py</em>, or give execute permissions
  453. to the file, and directly run it as <em>logcondense.py</em>. logcondense.py needs to be
  454. run by a user who has sufficient permissions to remove files from locations where log
  455. files are uploaded in the DFS, if permissions are enabled. For e.g. as mentioned in the
  456. <a href="hod_config_guide.html#3.7+hodring+options">configuration guide</a>, the logs could
  457. be configured to come under the user's home directory in HDFS. In that case, the user
  458. running logcondense.py should have super user privileges to remove the files from under
  459. all user home directories.</p>
  460. <a name="N10162"></a><a name="Command+Line+Options+for+logcondense.py"></a>
  461. <h4>Command Line Options for logcondense.py</h4>
  462. <p>The following command line options are supported for logcondense.py.</p>
  463. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  464. <tr>
  465. <td colspan="1" rowspan="1">Short Option</td>
  466. <td colspan="1" rowspan="1">Long option</td>
  467. <td colspan="1" rowspan="1">Meaning</td>
  468. <td colspan="1" rowspan="1">Example</td>
  469. </tr>
  470. <tr>
  471. <td colspan="1" rowspan="1">-p</td>
  472. <td colspan="1" rowspan="1">--package</td>
  473. <td colspan="1" rowspan="1">Complete path to the hadoop script. The version of hadoop must be the same as the
  474. one running HDFS.</td>
  475. <td colspan="1" rowspan="1">/usr/bin/hadoop</td>
  476. </tr>
  477. <tr>
  478. <td colspan="1" rowspan="1">-d</td>
  479. <td colspan="1" rowspan="1">--days</td>
  480. <td colspan="1" rowspan="1">Delete log files older than the specified number of days</td>
  481. <td colspan="1" rowspan="1">7</td>
  482. </tr>
  483. <tr>
  484. <td colspan="1" rowspan="1">-c</td>
  485. <td colspan="1" rowspan="1">--config</td>
  486. <td colspan="1" rowspan="1">Path to the Hadoop configuration directory, under which hadoop-site.xml resides.
  487. The hadoop-site.xml must point to the HDFS NameNode from where logs are to be removed.</td>
  488. <td colspan="1" rowspan="1">/home/foo/hadoop/conf</td>
  489. </tr>
  490. <tr>
  491. <td colspan="1" rowspan="1">-l</td>
  492. <td colspan="1" rowspan="1">--logs</td>
  493. <td colspan="1" rowspan="1">A HDFS path, this must be the same HDFS path as specified for the log-destination-uri,
  494. as mentioned in the <a href="hod_config_guide.html#3.7+hodring+options">configuration guide</a>,
  495. without the hdfs:// URI string</td>
  496. <td colspan="1" rowspan="1">/user</td>
  497. </tr>
  498. <tr>
  499. <td colspan="1" rowspan="1">-n</td>
  500. <td colspan="1" rowspan="1">--dynamicdfs</td>
  501. <td colspan="1" rowspan="1">If true, this will indicate that the logcondense.py script should delete HDFS logs
  502. in addition to Map/Reduce logs. Otherwise, it only deletes Map/Reduce logs, which is also the
  503. default if this option is not specified. This option is useful if dynamic DFS installations
  504. are being provisioned by HOD, and the static DFS installation is being used only to collect
  505. logs - a scenario that may be common in test clusters.</td>
  506. <td colspan="1" rowspan="1">false</td>
  507. </tr>
  508. </table>
  509. <p>So, for example, to delete all log files older than 7 days using a hadoop-site.xml stored in
  510. ~/hadoop-conf, using the hadoop installation under ~/hadoop-0.17.0, you could say:</p>
  511. <p>
  512. <em>python logcondense.py -p ~/hadoop-0.17.0/bin/hadoop -d 7 -c ~/hadoop-conf -l /user</em>
  513. </p>
  514. <a name="N10205"></a><a name="checklimits.sh+-+Tool+to+update+torque+comment+field+reflecting+resource+limits"></a>
  515. <h3 class="h4">checklimits.sh - Tool to update torque comment field reflecting resource limits</h3>
  516. <p>checklimits is a HOD tool specific to torque/maui environment. It
  517. updates torque comment field when newly submitted job(s) violate/cross
  518. over user limits set up in maui scheduler. It uses qstat, does one pass
  519. over torque job list to find out queued or unfinished jobs, runs maui
  520. tool checkjob on each job to see if user limits are violated and then
  521. runs torque's qalter utility to update job attribute 'comment'. Currently
  522. it updates the comment as <em>User-limits exceeded. Requested:([0-9]*)
  523. Used:([0-9]*) MaxLimit:([0-9]*)</em> for those jobs that violate limits.
  524. This comment field is then used by HOD to behave accordingly depending on
  525. the type of violation.</p>
  526. <a name="N10211"></a><a name="Running+checklimits.sh"></a>
  527. <h4>Running checklimits.sh</h4>
  528. <p>checklimits.sh is available under hod_install_location/support
  529. folder. This is a shell script and can be run directly as <em>sh
  530. checklimits.sh </em>or as <em>./checklimits.sh</em> after enabling
  531. execute permissions. In order for this tool to be able to update
  532. comment field of jobs from different users, it has to be run with
  533. torque administrative privileges. This tool has to be run repeatedly
  534. after specific intervals of time to frequently update jobs violating
  535. constraints, for e.g. via cron. Please note that the resource manager
  536. and scheduler commands used in this script can be expensive and so
  537. it is better not to run this inside a tight loop without sleeping.</p>
  538. </div>
  539. </div>
  540. <!--+
  541. |end content
  542. +-->
  543. <div class="clearboth">&nbsp;</div>
  544. </div>
  545. <div id="footer">
  546. <!--+
  547. |start bottomstrip
  548. +-->
  549. <div class="lastmodified">
  550. <script type="text/javascript"><!--
  551. document.write("Last Published: " + document.lastModified);
  552. // --></script>
  553. </div>
  554. <div class="copyright">
  555. Copyright &copy;
  556. 2007 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
  557. </div>
  558. <!--+
  559. |end bottomstrip
  560. +-->
  561. </div>
  562. </body>
  563. </html>