commands_manual.xml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. <?xml version="1.0"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
  17. <document>
  18. <header>
  19. <title>Commands Guide</title>
  20. </header>
  21. <body>
  22. <section>
  23. <title>Overview</title>
  24. <p>
  25. All hadoop commands are invoked by the bin/hadoop script. Running the hadoop
  26. script without any arguments prints the description for all commands.
  27. </p>
  28. <p>
  29. <code>Usage: hadoop [--config confdir] [COMMAND] [GENERIC_OPTIONS] [COMMAND_OPTIONS]</code>
  30. </p>
  31. <p>
  32. Hadoop has an option parsing framework that employs parsing generic options as well as running classes.
  33. </p>
  34. <table>
  35. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  36. <tr>
  37. <td><code>--config confdir</code></td>
  38. <td>Overwrites the default Configuration directory. Default is ${HADOOP_HOME}/conf.</td>
  39. </tr>
  40. <tr>
  41. <td><code>GENERIC_OPTIONS</code></td>
  42. <td>The common set of options supported by multiple commands.</td>
  43. </tr>
  44. <tr>
  45. <td><code>COMMAND</code><br/><code>COMMAND_OPTIONS</code></td>
  46. <td>Various commands with their options are described in the following sections. The commands
  47. have been grouped into <a href="commands_manual.html#User+Commands">User Commands</a>
  48. and <a href="commands_manual.html#Administration+Commands">Administration Commands</a>.</td>
  49. </tr>
  50. </table>
  51. <section>
  52. <title>Generic Options</title>
  53. <p>
  54. The following options are supported by <a href="commands_manual.html#dfsadmin">dfsadmin</a>,
  55. <a href="commands_manual.html#fs">fs</a>, <a href="commands_manual.html#fsck">fsck</a> and
  56. <a href="commands_manual.html#job">job</a>.
  57. Applications should implement
  58. <a href="ext:api/org/apache/hadoop/util/tool">Tool</a> to support
  59. <a href="ext:api/org/apache/hadoop/util/genericoptionsparser">
  60. GenericOptions</a>.
  61. </p>
  62. <table>
  63. <tr><th> GENERIC_OPTION </th><th> Description </th></tr>
  64. <tr>
  65. <td><code>-conf &lt;configuration file&gt;</code></td>
  66. <td>Specify an application configuration file.</td>
  67. </tr>
  68. <tr>
  69. <td><code>-D &lt;property=value&gt;</code></td>
  70. <td>Use value for given property.</td>
  71. </tr>
  72. <tr>
  73. <td><code>-fs &lt;local|namenode:port&gt;</code></td>
  74. <td>Specify a namenode.</td>
  75. </tr>
  76. <tr>
  77. <td><code>-jt &lt;local|jobtracker:port&gt;</code></td>
  78. <td>Specify a job tracker. Applies only to <a href="commands_manual.html#job">job</a>.</td>
  79. </tr>
  80. <tr>
  81. <td><code>-files &lt;comma separated list of files&gt;</code></td>
  82. <td>Specify comma separated files to be copied to the map reduce cluster.
  83. Applies only to <a href="commands_manual.html#job">job</a>.</td>
  84. </tr>
  85. <tr>
  86. <td><code>-libjars &lt;comma seperated list of jars&gt;</code></td>
  87. <td>Specify comma separated jar files to include in the classpath.
  88. Applies only to <a href="commands_manual.html#job">job</a>.</td>
  89. </tr>
  90. <tr>
  91. <td><code>-archives &lt;comma separated list of archives&gt;</code></td>
  92. <td>Specify comma separated archives to be unarchived on the compute machines.
  93. Applies only to <a href="commands_manual.html#job">job</a>.</td>
  94. </tr>
  95. </table>
  96. </section>
  97. </section>
  98. <section>
  99. <title> User Commands </title>
  100. <p>Commands useful for users of a hadoop cluster.</p>
  101. <section>
  102. <title> archive </title>
  103. <p>
  104. Creates a hadoop archive. More information can be found at <a href="hadoop_archives.html">Hadoop Archives</a>.
  105. </p>
  106. <p>
  107. <code>Usage: hadoop archive -archiveName NAME &lt;src&gt;* &lt;dest&gt;</code>
  108. </p>
  109. <table>
  110. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  111. <tr>
  112. <td><code>-archiveName NAME</code></td>
  113. <td>Name of the archive to be created.</td>
  114. </tr>
  115. <tr>
  116. <td><code>src</code></td>
  117. <td>Filesystem pathnames which work as usual with regular expressions.</td>
  118. </tr>
  119. <tr>
  120. <td><code>dest</code></td>
  121. <td>Destination directory which would contain the archive.</td>
  122. </tr>
  123. </table>
  124. </section>
  125. <section>
  126. <title> distcp </title>
  127. <p>
  128. Copy file or directories recursively. More information can be found at <a href="distcp.html">Hadoop DistCp Guide</a>.
  129. </p>
  130. <p>
  131. <code>Usage: hadoop distcp &lt;srcurl&gt; &lt;desturl&gt;</code>
  132. </p>
  133. <table>
  134. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  135. <tr>
  136. <td><code>srcurl</code></td>
  137. <td>Source Url</td>
  138. </tr>
  139. <tr>
  140. <td><code>desturl</code></td>
  141. <td>Destination Url</td>
  142. </tr>
  143. </table>
  144. </section>
  145. <section>
  146. <title> fs </title>
  147. <p>
  148. <code>Usage: hadoop fs [</code><a href="commands_manual.html#Generic+Options">GENERIC_OPTIONS</a><code>]
  149. [COMMAND_OPTIONS]</code>
  150. </p>
  151. <p>
  152. Runs a generic filesystem user client.
  153. </p>
  154. <p>
  155. The various COMMAND_OPTIONS can be found at <a href="hdfs_shell.html">Hadoop FS Shell Guide</a>.
  156. </p>
  157. </section>
  158. <section>
  159. <title> fsck </title>
  160. <p>
  161. Runs a HDFS filesystem checking utility. See <a href="hdfs_user_guide.html#Fsck">Fsck</a> for more info.
  162. </p>
  163. <p><code>Usage: hadoop fsck [</code><a href="commands_manual.html#Generic+Options">GENERIC_OPTIONS</a><code>]
  164. &lt;path&gt; [-move | -delete | -openforwrite] [-files [-blocks
  165. [-locations | -racks]]]</code></p>
  166. <table>
  167. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  168. <tr>
  169. <td><code>&lt;path&gt;</code></td>
  170. <td>Start checking from this path.</td>
  171. </tr>
  172. <tr>
  173. <td><code>-move</code></td>
  174. <td>Move corrupted files to /lost+found</td>
  175. </tr>
  176. <tr>
  177. <td><code>-delete</code></td>
  178. <td>Delete corrupted files.</td>
  179. </tr>
  180. <tr>
  181. <td><code>-openforwrite</code></td>
  182. <td>Print out files opened for write.</td>
  183. </tr>
  184. <tr>
  185. <td><code>-files</code></td>
  186. <td>Print out files being checked.</td>
  187. </tr>
  188. <tr>
  189. <td><code>-blocks</code></td>
  190. <td>Print out block report.</td>
  191. </tr>
  192. <tr>
  193. <td><code>-locations</code></td>
  194. <td>Print out locations for every block.</td>
  195. </tr>
  196. <tr>
  197. <td><code>-racks</code></td>
  198. <td>Print out network topology for data-node locations.</td>
  199. </tr>
  200. </table>
  201. </section>
  202. <section>
  203. <title> jar </title>
  204. <p>
  205. Runs a jar file. Users can bundle their Map Reduce code in a jar file and execute it using this command.
  206. </p>
  207. <p>
  208. <code>Usage: hadoop jar &lt;jar&gt; [mainClass] args...</code>
  209. </p>
  210. <p>
  211. The streaming jobs are run via this command. Examples can be referred from
  212. <a href="streaming.html#More+usage+examples">Streaming examples</a>
  213. </p>
  214. <p>
  215. Word count example is also run using jar command. It can be referred from
  216. <a href="mapred_tutorial.html#Usage">Wordcount example</a>
  217. </p>
  218. </section>
  219. <section>
  220. <title> job </title>
  221. <p>
  222. Command to interact with Map Reduce Jobs.
  223. </p>
  224. <p>
  225. <code>Usage: hadoop job [</code><a href="commands_manual.html#Generic+Options">GENERIC_OPTIONS</a><code>]
  226. [-submit &lt;job-file&gt;] | [-status &lt;job-id&gt;] |
  227. [-counter &lt;job-id&gt; &lt;group-name&gt; &lt;counter-name&gt;] | [-kill &lt;job-id&gt;] |
  228. [-events &lt;job-id&gt; &lt;from-event-#&gt; &lt;#-of-events&gt;] | [-history [all] &lt;jobOutputDir&gt;] |
  229. [-list [all]] | [-kill-task &lt;task-id&gt;] | [-fail-task &lt;task-id&gt;] |
  230. [-set-priority &lt;job-id&gt; &lt;priority&gt;]</code>
  231. </p>
  232. <table>
  233. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  234. <tr>
  235. <td><code>-submit &lt;job-file&gt;</code></td>
  236. <td>Submits the job.</td>
  237. </tr>
  238. <tr>
  239. <td><code>-status &lt;job-id&gt;</code></td>
  240. <td>Prints the map and reduce completion percentage and all job counters.</td>
  241. </tr>
  242. <tr>
  243. <td><code>-counter &lt;job-id&gt; &lt;group-name&gt; &lt;counter-name&gt;</code></td>
  244. <td>Prints the counter value.</td>
  245. </tr>
  246. <tr>
  247. <td><code>-kill &lt;job-id&gt;</code></td>
  248. <td>Kills the job.</td>
  249. </tr>
  250. <tr>
  251. <td><code>-events &lt;job-id&gt; &lt;from-event-#&gt; &lt;#-of-events&gt;</code></td>
  252. <td>Prints the events' details received by jobtracker for the given range.</td>
  253. </tr>
  254. <tr>
  255. <td><code>-history [all] &lt;jobOutputDir&gt;</code></td>
  256. <td>-history &lt;jobOutputDir&gt; prints job details, failed and killed tip details. More details
  257. about the job such as successful tasks and task attempts made for each task can be viewed by
  258. specifying the [all] option. </td>
  259. </tr>
  260. <tr>
  261. <td><code>-list [all]</code></td>
  262. <td>-list all displays all jobs. -list displays only jobs which are yet to complete.</td>
  263. </tr>
  264. <tr>
  265. <td><code>-kill-task &lt;task-id&gt;</code></td>
  266. <td>Kills the task. Killed tasks are NOT counted against failed attempts.</td>
  267. </tr>
  268. <tr>
  269. <td><code>-fail-task &lt;task-id&gt;</code></td>
  270. <td>Fails the task. Failed tasks are counted against failed attempts.</td>
  271. </tr>
  272. <tr>
  273. <td><code>-set-priority &lt;job-id&gt; &lt;priority&gt;</code></td>
  274. <td>Changes the priority of the job.
  275. Allowed priority values are VERY_HIGH, HIGH, NORMAL, LOW, VERY_LOW</td>
  276. </tr>
  277. </table>
  278. </section>
  279. <section>
  280. <title> pipes </title>
  281. <p>
  282. Runs a pipes job.
  283. </p>
  284. <p>
  285. <code>Usage: hadoop pipes [-conf &lt;path&gt;] [-jobconf &lt;key=value&gt;, &lt;key=value&gt;, ...]
  286. [-input &lt;path&gt;] [-output &lt;path&gt;] [-jar &lt;jar file&gt;] [-inputformat &lt;class&gt;]
  287. [-map &lt;class&gt;] [-partitioner &lt;class&gt;] [-reduce &lt;class&gt;] [-writer &lt;class&gt;]
  288. [-program &lt;executable&gt;] [-reduces &lt;num&gt;] </code>
  289. </p>
  290. <table>
  291. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  292. <tr>
  293. <td><code>-conf &lt;path&gt;</code></td>
  294. <td>Configuration for job</td>
  295. </tr>
  296. <tr>
  297. <td><code>-jobconf &lt;key=value&gt;, &lt;key=value&gt;, ...</code></td>
  298. <td>Add/override configuration for job</td>
  299. </tr>
  300. <tr>
  301. <td><code>-input &lt;path&gt;</code></td>
  302. <td>Input directory</td>
  303. </tr>
  304. <tr>
  305. <td><code>-output &lt;path&gt;</code></td>
  306. <td>Output directory</td>
  307. </tr>
  308. <tr>
  309. <td><code>-jar &lt;jar file&gt;</code></td>
  310. <td>Jar filename</td>
  311. </tr>
  312. <tr>
  313. <td><code>-inputformat &lt;class&gt;</code></td>
  314. <td>InputFormat class</td>
  315. </tr>
  316. <tr>
  317. <td><code>-map &lt;class&gt;</code></td>
  318. <td>Java Map class</td>
  319. </tr>
  320. <tr>
  321. <td><code>-partitioner &lt;class&gt;</code></td>
  322. <td>Java Partitioner</td>
  323. </tr>
  324. <tr>
  325. <td><code>-reduce &lt;class&gt;</code></td>
  326. <td>Java Reduce class</td>
  327. </tr>
  328. <tr>
  329. <td><code>-writer &lt;class&gt;</code></td>
  330. <td>Java RecordWriter</td>
  331. </tr>
  332. <tr>
  333. <td><code>-program &lt;executable&gt;</code></td>
  334. <td>Executable URI</td>
  335. </tr>
  336. <tr>
  337. <td><code>-reduces &lt;num&gt;</code></td>
  338. <td>Number of reduces</td>
  339. </tr>
  340. </table>
  341. </section>
  342. <section>
  343. <title> queue </title>
  344. <p>
  345. command to interact and view Job Queue information
  346. </p>
  347. <p>
  348. <code>Usage : hadoop queue [-list] | [-info &lt;job-queue-name&gt; [-showJobs]] | [-showacls]</code>
  349. </p>
  350. <table>
  351. <tr>
  352. <th> COMMAND_OPTION </th><th> Description </th>
  353. </tr>
  354. <tr>
  355. <td><code>-list</code> </td>
  356. <td>Gets list of Job Queues configured in the system. Along with scheduling information
  357. associated with the job queues.
  358. </td>
  359. </tr>
  360. <tr>
  361. <td><code>-info &lt;job-queue-name&gt; [-showJobs]</code></td>
  362. <td>
  363. Displays the job queue information and associated scheduling information of particular
  364. job queue. If -showJobs options is present a list of jobs submitted to the particular job
  365. queue is displayed.
  366. </td>
  367. </tr>
  368. <tr>
  369. <td><code>-showacls</code></td>
  370. <td>Displays the queue name and associated queue operations allowed for the current user.
  371. The list consists of only those queues to which the user has access.
  372. </td>
  373. </tr>
  374. </table>
  375. </section>
  376. <section>
  377. <title> version </title>
  378. <p>
  379. Prints the version.
  380. </p>
  381. <p>
  382. <code>Usage: hadoop version</code>
  383. </p>
  384. </section>
  385. <section>
  386. <title> CLASSNAME </title>
  387. <p>
  388. hadoop script can be used to invoke any class.
  389. </p>
  390. <p>
  391. <code>Usage: hadoop CLASSNAME</code>
  392. </p>
  393. <p>
  394. Runs the class named CLASSNAME.
  395. </p>
  396. </section>
  397. </section>
  398. <section>
  399. <title> Administration Commands </title>
  400. <p>Commands useful for administrators of a hadoop cluster.</p>
  401. <section>
  402. <title> balancer </title>
  403. <p>
  404. Runs a cluster balancing utility. An administrator can simply press Ctrl-C to stop the
  405. rebalancing process. See <a href="hdfs_user_guide.html#Rebalancer">Rebalancer</a> for more details.
  406. </p>
  407. <p>
  408. <code>Usage: hadoop balancer [-threshold &lt;threshold&gt;]</code>
  409. </p>
  410. <table>
  411. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  412. <tr>
  413. <td><code>-threshold &lt;threshold&gt;</code></td>
  414. <td>Percentage of disk capacity. This overwrites the default threshold.</td>
  415. </tr>
  416. </table>
  417. </section>
  418. <section>
  419. <title> daemonlog </title>
  420. <p>
  421. Get/Set the log level for each daemon.
  422. </p>
  423. <p>
  424. <code>Usage: hadoop daemonlog -getlevel &lt;host:port&gt; &lt;name&gt;</code><br/>
  425. <code>Usage: hadoop daemonlog -setlevel &lt;host:port&gt; &lt;name&gt; &lt;level&gt;</code>
  426. </p>
  427. <table>
  428. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  429. <tr>
  430. <td><code>-getlevel &lt;host:port&gt; &lt;name&gt;</code></td>
  431. <td>Prints the log level of the daemon running at &lt;host:port&gt;.
  432. This command internally connects to http://&lt;host:port&gt;/logLevel?log=&lt;name&gt;</td>
  433. </tr>
  434. <tr>
  435. <td><code>-setlevel &lt;host:port&gt; &lt;name&gt; &lt;level&gt;</code></td>
  436. <td>Sets the log level of the daemon running at &lt;host:port&gt;.
  437. This command internally connects to http://&lt;host:port&gt;/logLevel?log=&lt;name&gt;</td>
  438. </tr>
  439. </table>
  440. </section>
  441. <section>
  442. <title> datanode</title>
  443. <p>
  444. Runs a HDFS datanode.
  445. </p>
  446. <p>
  447. <code>Usage: hadoop datanode [-rollback]</code>
  448. </p>
  449. <table>
  450. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  451. <tr>
  452. <td><code>-rollback</code></td>
  453. <td>Rollsback the datanode to the previous version. This should be used after stopping the datanode
  454. and distributing the old hadoop version.</td>
  455. </tr>
  456. </table>
  457. </section>
  458. <section>
  459. <title> dfsadmin </title>
  460. <p>
  461. Runs a HDFS dfsadmin client.
  462. </p>
  463. <p>
  464. <code>Usage: hadoop dfsadmin [</code><a href="commands_manual.html#Generic+Options">GENERIC_OPTIONS</a><code>] [-report] [-safemode enter | leave | get | wait] [-refreshNodes]
  465. [-finalizeUpgrade] [-upgradeProgress status | details | force] [-metasave filename]
  466. [-setQuota &lt;quota&gt; &lt;dirname&gt;...&lt;dirname&gt;] [-clrQuota &lt;dirname&gt;...&lt;dirname&gt;]
  467. [-restoreFailedStorage true|false|check]
  468. [-help [cmd]]</code>
  469. </p>
  470. <table>
  471. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  472. <tr>
  473. <td><code>-report</code></td>
  474. <td>Reports basic filesystem information and statistics.</td>
  475. </tr>
  476. <tr>
  477. <td><code>-safemode enter | leave | get | wait</code></td>
  478. <td>Safe mode maintenance command.
  479. Safe mode is a Namenode state in which it <br/>
  480. 1. does not accept changes to the name space (read-only) <br/>
  481. 2. does not replicate or delete blocks. <br/>
  482. Safe mode is entered automatically at Namenode startup, and
  483. leaves safe mode automatically when the configured minimum
  484. percentage of blocks satisfies the minimum replication
  485. condition. Safe mode can also be entered manually, but then
  486. it can only be turned off manually as well.</td>
  487. </tr>
  488. <tr>
  489. <td><code>-refreshNodes</code></td>
  490. <td>Re-read the hosts and exclude files to update the set
  491. of Datanodes that are allowed to connect to the Namenode
  492. and those that should be decommissioned or recommissioned.</td>
  493. </tr>
  494. <tr>
  495. <td><code>-finalizeUpgrade</code></td>
  496. <td>Finalize upgrade of HDFS.
  497. Datanodes delete their previous version working directories,
  498. followed by Namenode doing the same.
  499. This completes the upgrade process.</td>
  500. </tr>
  501. <tr>
  502. <td><code>-printTopology</code></td>
  503. <td>Print a tree of the rack/datanode topology of the
  504. cluster as seen by the NameNode.</td>
  505. </tr>
  506. <tr>
  507. <td><code>-upgradeProgress status | details | force</code></td>
  508. <td>Request current distributed upgrade status,
  509. a detailed status or force the upgrade to proceed.</td>
  510. </tr>
  511. <tr>
  512. <td><code>-metasave filename</code></td>
  513. <td>Save Namenode's primary data structures
  514. to &lt;filename&gt; in the directory specified by hadoop.log.dir property.
  515. &lt;filename&gt; will contain one line for each of the following <br/>
  516. 1. Datanodes heart beating with Namenode<br/>
  517. 2. Blocks waiting to be replicated<br/>
  518. 3. Blocks currrently being replicated<br/>
  519. 4. Blocks waiting to be deleted</td>
  520. </tr>
  521. <tr>
  522. <td><code>-setQuota &lt;quota&gt; &lt;dirname&gt;...&lt;dirname&gt;</code></td>
  523. <td>Set the quota &lt;quota&gt; for each directory &lt;dirname&gt;.
  524. The directory quota is a long integer that puts a hard limit on the number of names in the directory tree.<br/>
  525. Best effort for the directory, with faults reported if<br/>
  526. 1. N is not a positive integer, or<br/>
  527. 2. user is not an administrator, or<br/>
  528. 3. the directory does not exist or is a file, or<br/>
  529. 4. the directory would immediately exceed the new quota.</td>
  530. </tr>
  531. <tr>
  532. <td><code>-clrQuota &lt;dirname&gt;...&lt;dirname&gt;</code></td>
  533. <td>Clear the quota for each directory &lt;dirname&gt;.<br/>
  534. Best effort for the directory. with fault reported if<br/>
  535. 1. the directory does not exist or is a file, or<br/>
  536. 2. user is not an administrator.<br/>
  537. It does not fault if the directory has no quota.</td>
  538. </tr>
  539. <tr>
  540. <td><code>-restoreFailedStorage true | false | check</code></td>
  541. <td>This option will turn on/off automatic attempt to restore failed storage replicas.
  542. If a failed storage becomes available again the system will attempt to restore
  543. edits and/or fsimage during checkpoint. 'check' option will return current setting.</td>
  544. </tr>
  545. <tr>
  546. <td><code>-help [cmd]</code></td>
  547. <td> Displays help for the given command or all commands if none
  548. is specified.</td>
  549. </tr>
  550. </table>
  551. </section>
  552. <section>
  553. <title>mradmin</title>
  554. <p>Runs MR admin client</p>
  555. <p><code>Usage: hadoop mradmin [</code>
  556. <a href="commands_manual.html#Generic+Options">GENERIC_OPTIONS</a>
  557. <code>] [-refreshQueues] </code></p>
  558. <table>
  559. <tr>
  560. <th> COMMAND_OPTION </th><th> Description </th>
  561. </tr>
  562. <tr>
  563. <td><code>-refreshQueues</code></td>
  564. <td>Refresh the access control lists and state of queues configured in
  565. the system. These properties are loaded from
  566. <code>mapred-queues.xml</code>. If the file is malformed, then the
  567. existing properties are not disturbed. New operations on jobs in the
  568. queues will be subjected to checks against the refreshed ACLs. Likewise,
  569. new jobs will be accepted to queues only if the queue state is running.
  570. </tr>
  571. </table>
  572. </section>
  573. <section>
  574. <title> jobtracker </title>
  575. <p>
  576. Runs the MapReduce job Tracker node.
  577. </p>
  578. <p>
  579. <code>Usage: hadoop jobtracker</code>
  580. </p>
  581. </section>
  582. <section>
  583. <title> namenode </title>
  584. <p>
  585. Runs the namenode. More info about the upgrade, rollback and finalize is at
  586. <a href="hdfs_user_guide.html#Upgrade+and+Rollback">Upgrade Rollback</a>
  587. </p>
  588. <p>
  589. <code>Usage: hadoop namenode [-format] | [-upgrade] | [-rollback] | [-finalize] | [-importCheckpoint]</code>
  590. </p>
  591. <table>
  592. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  593. <tr>
  594. <td><code>-regular</code></td>
  595. <td>Start namenode in standard, active role rather than as backup or checkpoint node. This is the default role.</td>
  596. </tr>
  597. <tr>
  598. <td><code>-checkpoint</code></td>
  599. <td>Start namenode in checkpoint role, creating periodic checkpoints of the active namenode metadata.</td>
  600. </tr>
  601. <tr>
  602. <td><code>-backup</code></td>
  603. <td>Start namenode in backup role, maintaining an up-to-date in-memory copy of the namespace and creating periodic checkpoints.</td>
  604. </tr>
  605. <tr>
  606. <td><code>-format</code></td>
  607. <td>Formats the namenode. It starts the namenode, formats it and then shut it down.</td>
  608. </tr>
  609. <tr>
  610. <td><code>-upgrade</code></td>
  611. <td>Namenode should be started with upgrade option after the distribution of new hadoop version.</td>
  612. </tr>
  613. <tr>
  614. <td><code>-rollback</code></td>
  615. <td>Rollsback the namenode to the previous version. This should be used after stopping the cluster
  616. and distributing the old hadoop version.</td>
  617. </tr>
  618. <tr>
  619. <td><code>-finalize</code></td>
  620. <td>Finalize will remove the previous state of the files system. Recent upgrade will become permanent.
  621. Rollback option will not be available anymore. After finalization it shuts the namenode down.</td>
  622. </tr>
  623. <tr>
  624. <td><code>-importCheckpoint</code></td>
  625. <td>Loads image from a checkpoint directory and saves it into the current one. Checkpoint directory
  626. is read from property fs.checkpoint.dir</td>
  627. </tr>
  628. </table>
  629. </section>
  630. <section>
  631. <title> secondarynamenode </title>
  632. <p>
  633. Use of the Secondary NameNode has been deprecated. Instead, consider using a
  634. <a href="hdfs_user_guide.html#Checkpoint+node">Checkpoint node</a> or
  635. <a href="hdfs_user_guide.html#Backup+node">Backup node</a>. Runs the HDFS secondary
  636. namenode. See <a href="hdfs_user_guide.html#Secondary+NameNode">Secondary NameNode</a>
  637. for more info.
  638. </p>
  639. <p>
  640. <code>Usage: hadoop secondarynamenode [-checkpoint [force]] | [-geteditsize]</code>
  641. </p>
  642. <table>
  643. <tr><th> COMMAND_OPTION </th><th> Description </th></tr>
  644. <tr>
  645. <td><code>-checkpoint [force]</code></td>
  646. <td>Checkpoints the Secondary namenode if EditLog size >= fs.checkpoint.size.
  647. If -force is used, checkpoint irrespective of EditLog size.</td>
  648. </tr>
  649. <tr>
  650. <td><code>-geteditsize</code></td>
  651. <td>Prints the EditLog size.</td>
  652. </tr>
  653. </table>
  654. </section>
  655. <section>
  656. <title> tasktracker </title>
  657. <p>
  658. Runs a MapReduce task Tracker node.
  659. </p>
  660. <p>
  661. <code>Usage: hadoop tasktracker</code>
  662. </p>
  663. </section>
  664. </section>
  665. </body>
  666. </document>