[120] | 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>Commands Guide</title> |
---|
| 9 | <link type="text/css" href="skin/basic.css" rel="stylesheet"> |
---|
| 10 | <link media="screen" type="text/css" href="skin/screen.css" rel="stylesheet"> |
---|
| 11 | <link media="print" type="text/css" href="skin/print.css" rel="stylesheet"> |
---|
| 12 | <link type="text/css" href="skin/profile.css" rel="stylesheet"> |
---|
| 13 | <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> |
---|
| 14 | <link rel="shortcut icon" href="images/favicon.ico"> |
---|
| 15 | </head> |
---|
| 16 | <body onload="init()"> |
---|
| 17 | <script type="text/javascript">ndeSetTextSize();</script> |
---|
| 18 | <div id="top"> |
---|
| 19 | <!--+ |
---|
| 20 | |breadtrail |
---|
| 21 | +--> |
---|
| 22 | <div class="breadtrail"> |
---|
| 23 | <a href="http://www.apache.org/">Apache</a> > <a href="http://hadoop.apache.org/">Hadoop</a> > <a href="http://hadoop.apache.org/core/">Core</a><script src="skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script> |
---|
| 24 | </div> |
---|
| 25 | <!--+ |
---|
| 26 | |header |
---|
| 27 | +--> |
---|
| 28 | <div class="header"> |
---|
| 29 | <!--+ |
---|
| 30 | |start group logo |
---|
| 31 | +--> |
---|
| 32 | <div class="grouplogo"> |
---|
| 33 | <a href="http://hadoop.apache.org/"><img class="logoImage" alt="Hadoop" src="images/hadoop-logo.jpg" title="Apache Hadoop"></a> |
---|
| 34 | </div> |
---|
| 35 | <!--+ |
---|
| 36 | |end group logo |
---|
| 37 | +--> |
---|
| 38 | <!--+ |
---|
| 39 | |start Project Logo |
---|
| 40 | +--> |
---|
| 41 | <div class="projectlogo"> |
---|
| 42 | <a href="http://hadoop.apache.org/core/"><img class="logoImage" alt="Hadoop" src="images/core-logo.gif" title="Scalable Computing Platform"></a> |
---|
| 43 | </div> |
---|
| 44 | <!--+ |
---|
| 45 | |end Project Logo |
---|
| 46 | +--> |
---|
| 47 | <!--+ |
---|
| 48 | |start Search |
---|
| 49 | +--> |
---|
| 50 | <div class="searchbox"> |
---|
| 51 | <form action="http://www.google.com/search" method="get" class="roundtopsmall"> |
---|
| 52 | <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"> |
---|
| 53 | <input name="Search" value="Search" type="submit"> |
---|
| 54 | </form> |
---|
| 55 | </div> |
---|
| 56 | <!--+ |
---|
| 57 | |end search |
---|
| 58 | +--> |
---|
| 59 | <!--+ |
---|
| 60 | |start Tabs |
---|
| 61 | +--> |
---|
| 62 | <ul id="tabs"> |
---|
| 63 | <li> |
---|
| 64 | <a class="unselected" href="http://hadoop.apache.org/core/">Project</a> |
---|
| 65 | </li> |
---|
| 66 | <li> |
---|
| 67 | <a class="unselected" href="http://wiki.apache.org/hadoop">Wiki</a> |
---|
| 68 | </li> |
---|
| 69 | <li class="current"> |
---|
| 70 | <a class="selected" href="index.html">Hadoop 0.20 Documentation</a> |
---|
| 71 | </li> |
---|
| 72 | </ul> |
---|
| 73 | <!--+ |
---|
| 74 | |end Tabs |
---|
| 75 | +--> |
---|
| 76 | </div> |
---|
| 77 | </div> |
---|
| 78 | <div id="main"> |
---|
| 79 | <div id="publishedStrip"> |
---|
| 80 | <!--+ |
---|
| 81 | |start Subtabs |
---|
| 82 | +--> |
---|
| 83 | <div id="level2tabs"></div> |
---|
| 84 | <!--+ |
---|
| 85 | |end Endtabs |
---|
| 86 | +--> |
---|
| 87 | <script type="text/javascript"><!-- |
---|
| 88 | document.write("Last Published: " + document.lastModified); |
---|
| 89 | // --></script> |
---|
| 90 | </div> |
---|
| 91 | <!--+ |
---|
| 92 | |breadtrail |
---|
| 93 | +--> |
---|
| 94 | <div class="breadtrail"> |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | </div> |
---|
| 98 | <!--+ |
---|
| 99 | |start Menu, mainarea |
---|
| 100 | +--> |
---|
| 101 | <!--+ |
---|
| 102 | |start Menu |
---|
| 103 | +--> |
---|
| 104 | <div id="menu"> |
---|
| 105 | <div onclick="SwitchMenu('menu_1.1', 'skin/')" id="menu_1.1Title" class="menutitle">Getting Started</div> |
---|
| 106 | <div id="menu_1.1" class="menuitemgroup"> |
---|
| 107 | <div class="menuitem"> |
---|
| 108 | <a href="index.html">Overview</a> |
---|
| 109 | </div> |
---|
| 110 | <div class="menuitem"> |
---|
| 111 | <a href="quickstart.html">Quick Start</a> |
---|
| 112 | </div> |
---|
| 113 | <div class="menuitem"> |
---|
| 114 | <a href="cluster_setup.html">Cluster Setup</a> |
---|
| 115 | </div> |
---|
| 116 | <div class="menuitem"> |
---|
| 117 | <a href="mapred_tutorial.html">Map/Reduce Tutorial</a> |
---|
| 118 | </div> |
---|
| 119 | </div> |
---|
| 120 | <div onclick="SwitchMenu('menu_selected_1.2', 'skin/')" id="menu_selected_1.2Title" class="menutitle" style="background-image: url('skin/images/chapter_open.gif');">Programming Guides</div> |
---|
| 121 | <div id="menu_selected_1.2" class="selectedmenuitemgroup" style="display: block;"> |
---|
| 122 | <div class="menupage"> |
---|
| 123 | <div class="menupagetitle">Commands</div> |
---|
| 124 | </div> |
---|
| 125 | <div class="menuitem"> |
---|
| 126 | <a href="distcp.html">DistCp</a> |
---|
| 127 | </div> |
---|
| 128 | <div class="menuitem"> |
---|
| 129 | <a href="native_libraries.html">Native Libraries</a> |
---|
| 130 | </div> |
---|
| 131 | <div class="menuitem"> |
---|
| 132 | <a href="streaming.html">Streaming</a> |
---|
| 133 | </div> |
---|
| 134 | <div class="menuitem"> |
---|
| 135 | <a href="fair_scheduler.html">Fair Scheduler</a> |
---|
| 136 | </div> |
---|
| 137 | <div class="menuitem"> |
---|
| 138 | <a href="capacity_scheduler.html">Capacity Scheduler</a> |
---|
| 139 | </div> |
---|
| 140 | <div class="menuitem"> |
---|
| 141 | <a href="service_level_auth.html">Service Level Authorization</a> |
---|
| 142 | </div> |
---|
| 143 | <div class="menuitem"> |
---|
| 144 | <a href="vaidya.html">Vaidya</a> |
---|
| 145 | </div> |
---|
| 146 | <div class="menuitem"> |
---|
| 147 | <a href="hadoop_archives.html">Archives</a> |
---|
| 148 | </div> |
---|
| 149 | </div> |
---|
| 150 | <div onclick="SwitchMenu('menu_1.3', 'skin/')" id="menu_1.3Title" class="menutitle">HDFS</div> |
---|
| 151 | <div id="menu_1.3" class="menuitemgroup"> |
---|
| 152 | <div class="menuitem"> |
---|
| 153 | <a href="hdfs_user_guide.html">User Guide</a> |
---|
| 154 | </div> |
---|
| 155 | <div class="menuitem"> |
---|
| 156 | <a href="hdfs_design.html">Architecture</a> |
---|
| 157 | </div> |
---|
| 158 | <div class="menuitem"> |
---|
| 159 | <a href="hdfs_shell.html">File System Shell Guide</a> |
---|
| 160 | </div> |
---|
| 161 | <div class="menuitem"> |
---|
| 162 | <a href="hdfs_permissions_guide.html">Permissions Guide</a> |
---|
| 163 | </div> |
---|
| 164 | <div class="menuitem"> |
---|
| 165 | <a href="hdfs_quota_admin_guide.html">Quotas Guide</a> |
---|
| 166 | </div> |
---|
| 167 | <div class="menuitem"> |
---|
| 168 | <a href="SLG_user_guide.html">Synthetic Load Generator Guide</a> |
---|
| 169 | </div> |
---|
| 170 | <div class="menuitem"> |
---|
| 171 | <a href="libhdfs.html">C API libhdfs</a> |
---|
| 172 | </div> |
---|
| 173 | </div> |
---|
| 174 | <div onclick="SwitchMenu('menu_1.4', 'skin/')" id="menu_1.4Title" class="menutitle">HOD</div> |
---|
| 175 | <div id="menu_1.4" class="menuitemgroup"> |
---|
| 176 | <div class="menuitem"> |
---|
| 177 | <a href="hod_user_guide.html">User Guide</a> |
---|
| 178 | </div> |
---|
| 179 | <div class="menuitem"> |
---|
| 180 | <a href="hod_admin_guide.html">Admin Guide</a> |
---|
| 181 | </div> |
---|
| 182 | <div class="menuitem"> |
---|
| 183 | <a href="hod_config_guide.html">Config Guide</a> |
---|
| 184 | </div> |
---|
| 185 | </div> |
---|
| 186 | <div onclick="SwitchMenu('menu_1.5', 'skin/')" id="menu_1.5Title" class="menutitle">Miscellaneous</div> |
---|
| 187 | <div id="menu_1.5" class="menuitemgroup"> |
---|
| 188 | <div class="menuitem"> |
---|
| 189 | <a href="api/index.html">API Docs</a> |
---|
| 190 | </div> |
---|
| 191 | <div class="menuitem"> |
---|
| 192 | <a href="jdiff/changes.html">API Changes</a> |
---|
| 193 | </div> |
---|
| 194 | <div class="menuitem"> |
---|
| 195 | <a href="http://wiki.apache.org/hadoop/">Wiki</a> |
---|
| 196 | </div> |
---|
| 197 | <div class="menuitem"> |
---|
| 198 | <a href="http://wiki.apache.org/hadoop/FAQ">FAQ</a> |
---|
| 199 | </div> |
---|
| 200 | <div class="menuitem"> |
---|
| 201 | <a href="releasenotes.html">Release Notes</a> |
---|
| 202 | </div> |
---|
| 203 | <div class="menuitem"> |
---|
| 204 | <a href="changes.html">Change Log</a> |
---|
| 205 | </div> |
---|
| 206 | </div> |
---|
| 207 | <div id="credit"></div> |
---|
| 208 | <div id="roundbottom"> |
---|
| 209 | <img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div> |
---|
| 210 | <!--+ |
---|
| 211 | |alternative credits |
---|
| 212 | +--> |
---|
| 213 | <div id="credit2"></div> |
---|
| 214 | </div> |
---|
| 215 | <!--+ |
---|
| 216 | |end Menu |
---|
| 217 | +--> |
---|
| 218 | <!--+ |
---|
| 219 | |start content |
---|
| 220 | +--> |
---|
| 221 | <div id="content"> |
---|
| 222 | <div title="Portable Document Format" class="pdflink"> |
---|
| 223 | <a class="dida" href="commands_manual.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br> |
---|
| 224 | PDF</a> |
---|
| 225 | </div> |
---|
| 226 | <h1>Commands Guide</h1> |
---|
| 227 | <div id="minitoc-area"> |
---|
| 228 | <ul class="minitoc"> |
---|
| 229 | <li> |
---|
| 230 | <a href="#Overview">Overview</a> |
---|
| 231 | <ul class="minitoc"> |
---|
| 232 | <li> |
---|
| 233 | <a href="#Generic+Options">Generic Options</a> |
---|
| 234 | </li> |
---|
| 235 | </ul> |
---|
| 236 | </li> |
---|
| 237 | <li> |
---|
| 238 | <a href="#User+Commands"> User Commands </a> |
---|
| 239 | <ul class="minitoc"> |
---|
| 240 | <li> |
---|
| 241 | <a href="#archive"> archive </a> |
---|
| 242 | </li> |
---|
| 243 | <li> |
---|
| 244 | <a href="#distcp"> distcp </a> |
---|
| 245 | </li> |
---|
| 246 | <li> |
---|
| 247 | <a href="#fs"> fs </a> |
---|
| 248 | </li> |
---|
| 249 | <li> |
---|
| 250 | <a href="#fsck"> fsck </a> |
---|
| 251 | </li> |
---|
| 252 | <li> |
---|
| 253 | <a href="#jar"> jar </a> |
---|
| 254 | </li> |
---|
| 255 | <li> |
---|
| 256 | <a href="#job"> job </a> |
---|
| 257 | </li> |
---|
| 258 | <li> |
---|
| 259 | <a href="#pipes"> pipes </a> |
---|
| 260 | </li> |
---|
| 261 | <li> |
---|
| 262 | <a href="#queue"> queue </a> |
---|
| 263 | </li> |
---|
| 264 | <li> |
---|
| 265 | <a href="#version"> version </a> |
---|
| 266 | </li> |
---|
| 267 | <li> |
---|
| 268 | <a href="#CLASSNAME"> CLASSNAME </a> |
---|
| 269 | </li> |
---|
| 270 | </ul> |
---|
| 271 | </li> |
---|
| 272 | <li> |
---|
| 273 | <a href="#Administration+Commands"> Administration Commands </a> |
---|
| 274 | <ul class="minitoc"> |
---|
| 275 | <li> |
---|
| 276 | <a href="#balancer"> balancer </a> |
---|
| 277 | </li> |
---|
| 278 | <li> |
---|
| 279 | <a href="#daemonlog"> daemonlog </a> |
---|
| 280 | </li> |
---|
| 281 | <li> |
---|
| 282 | <a href="#datanode"> datanode</a> |
---|
| 283 | </li> |
---|
| 284 | <li> |
---|
| 285 | <a href="#dfsadmin"> dfsadmin </a> |
---|
| 286 | </li> |
---|
| 287 | <li> |
---|
| 288 | <a href="#jobtracker"> jobtracker </a> |
---|
| 289 | </li> |
---|
| 290 | <li> |
---|
| 291 | <a href="#namenode"> namenode </a> |
---|
| 292 | </li> |
---|
| 293 | <li> |
---|
| 294 | <a href="#secondarynamenode"> secondarynamenode </a> |
---|
| 295 | </li> |
---|
| 296 | <li> |
---|
| 297 | <a href="#tasktracker"> tasktracker </a> |
---|
| 298 | </li> |
---|
| 299 | </ul> |
---|
| 300 | </li> |
---|
| 301 | </ul> |
---|
| 302 | </div> |
---|
| 303 | |
---|
| 304 | <a name="N1000D"></a><a name="Overview"></a> |
---|
| 305 | <h2 class="h3">Overview</h2> |
---|
| 306 | <div class="section"> |
---|
| 307 | <p> |
---|
| 308 | All hadoop commands are invoked by the bin/hadoop script. Running the hadoop |
---|
| 309 | script without any arguments prints the description for all commands. |
---|
| 310 | </p> |
---|
| 311 | <p> |
---|
| 312 | |
---|
| 313 | <span class="codefrag">Usage: hadoop [--config confdir] [COMMAND] [GENERIC_OPTIONS] [COMMAND_OPTIONS]</span> |
---|
| 314 | |
---|
| 315 | </p> |
---|
| 316 | <p> |
---|
| 317 | Hadoop has an option parsing framework that employs parsing generic options as well as running classes. |
---|
| 318 | </p> |
---|
| 319 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 320 | |
---|
| 321 | <tr> |
---|
| 322 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 323 | </tr> |
---|
| 324 | |
---|
| 325 | |
---|
| 326 | <tr> |
---|
| 327 | |
---|
| 328 | <td colspan="1" rowspan="1"><span class="codefrag">--config confdir</span></td> |
---|
| 329 | <td colspan="1" rowspan="1">Overwrites the default Configuration directory. Default is ${HADOOP_HOME}/conf.</td> |
---|
| 330 | |
---|
| 331 | </tr> |
---|
| 332 | |
---|
| 333 | <tr> |
---|
| 334 | |
---|
| 335 | <td colspan="1" rowspan="1"><span class="codefrag">GENERIC_OPTIONS</span></td> |
---|
| 336 | <td colspan="1" rowspan="1">The common set of options supported by multiple commands.</td> |
---|
| 337 | |
---|
| 338 | </tr> |
---|
| 339 | |
---|
| 340 | <tr> |
---|
| 341 | |
---|
| 342 | <td colspan="1" rowspan="1"><span class="codefrag">COMMAND</span> |
---|
| 343 | <br> |
---|
| 344 | <span class="codefrag">COMMAND_OPTIONS</span></td> |
---|
| 345 | <td colspan="1" rowspan="1">Various commands with their options are described in the following sections. The commands |
---|
| 346 | have been grouped into <a href="commands_manual.html#User+Commands">User Commands</a> |
---|
| 347 | and <a href="commands_manual.html#Administration+Commands">Administration Commands</a>.</td> |
---|
| 348 | |
---|
| 349 | </tr> |
---|
| 350 | |
---|
| 351 | </table> |
---|
| 352 | <a name="N10061"></a><a name="Generic+Options"></a> |
---|
| 353 | <h3 class="h4">Generic Options</h3> |
---|
| 354 | <p> |
---|
| 355 | The following options are supported by <a href="commands_manual.html#dfsadmin">dfsadmin</a>, |
---|
| 356 | <a href="commands_manual.html#fs">fs</a>, <a href="commands_manual.html#fsck">fsck</a> and |
---|
| 357 | <a href="commands_manual.html#job">job</a>. |
---|
| 358 | Applications should implement |
---|
| 359 | <a href="api/org/apache/hadoop/util/Tool.html">Tool</a> to support |
---|
| 360 | <a href="api/org/apache/hadoop/util/GenericOptionsParser.html"> |
---|
| 361 | GenericOptions</a>. |
---|
| 362 | </p> |
---|
| 363 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 364 | |
---|
| 365 | <tr> |
---|
| 366 | <th colspan="1" rowspan="1"> GENERIC_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 367 | </tr> |
---|
| 368 | |
---|
| 369 | |
---|
| 370 | <tr> |
---|
| 371 | |
---|
| 372 | <td colspan="1" rowspan="1"><span class="codefrag">-conf <configuration file></span></td> |
---|
| 373 | <td colspan="1" rowspan="1">Specify an application configuration file.</td> |
---|
| 374 | |
---|
| 375 | </tr> |
---|
| 376 | |
---|
| 377 | <tr> |
---|
| 378 | |
---|
| 379 | <td colspan="1" rowspan="1"><span class="codefrag">-D <property=value></span></td> |
---|
| 380 | <td colspan="1" rowspan="1">Use value for given property.</td> |
---|
| 381 | |
---|
| 382 | </tr> |
---|
| 383 | |
---|
| 384 | <tr> |
---|
| 385 | |
---|
| 386 | <td colspan="1" rowspan="1"><span class="codefrag">-fs <local|namenode:port></span></td> |
---|
| 387 | <td colspan="1" rowspan="1">Specify a namenode.</td> |
---|
| 388 | |
---|
| 389 | </tr> |
---|
| 390 | |
---|
| 391 | <tr> |
---|
| 392 | |
---|
| 393 | <td colspan="1" rowspan="1"><span class="codefrag">-jt <local|jobtracker:port></span></td> |
---|
| 394 | <td colspan="1" rowspan="1">Specify a job tracker. Applies only to <a href="commands_manual.html#job">job</a>.</td> |
---|
| 395 | |
---|
| 396 | </tr> |
---|
| 397 | |
---|
| 398 | <tr> |
---|
| 399 | |
---|
| 400 | <td colspan="1" rowspan="1"><span class="codefrag">-files <comma separated list of files></span></td> |
---|
| 401 | <td colspan="1" rowspan="1">Specify comma separated files to be copied to the map reduce cluster. |
---|
| 402 | Applies only to <a href="commands_manual.html#job">job</a>.</td> |
---|
| 403 | |
---|
| 404 | </tr> |
---|
| 405 | |
---|
| 406 | <tr> |
---|
| 407 | |
---|
| 408 | <td colspan="1" rowspan="1"><span class="codefrag">-libjars <comma seperated list of jars></span></td> |
---|
| 409 | <td colspan="1" rowspan="1">Specify comma separated jar files to include in the classpath. |
---|
| 410 | Applies only to <a href="commands_manual.html#job">job</a>.</td> |
---|
| 411 | |
---|
| 412 | </tr> |
---|
| 413 | |
---|
| 414 | <tr> |
---|
| 415 | |
---|
| 416 | <td colspan="1" rowspan="1"><span class="codefrag">-archives <comma separated list of archives></span></td> |
---|
| 417 | <td colspan="1" rowspan="1">Specify comma separated archives to be unarchived on the compute machines. |
---|
| 418 | Applies only to <a href="commands_manual.html#job">job</a>.</td> |
---|
| 419 | |
---|
| 420 | </tr> |
---|
| 421 | |
---|
| 422 | </table> |
---|
| 423 | </div> |
---|
| 424 | |
---|
| 425 | |
---|
| 426 | <a name="N10103"></a><a name="User+Commands"></a> |
---|
| 427 | <h2 class="h3"> User Commands </h2> |
---|
| 428 | <div class="section"> |
---|
| 429 | <p>Commands useful for users of a hadoop cluster.</p> |
---|
| 430 | <a name="N1010C"></a><a name="archive"></a> |
---|
| 431 | <h3 class="h4"> archive </h3> |
---|
| 432 | <p> |
---|
| 433 | Creates a hadoop archive. More information can be found at <a href="hadoop_archives.html">Hadoop Archives</a>. |
---|
| 434 | </p> |
---|
| 435 | <p> |
---|
| 436 | |
---|
| 437 | <span class="codefrag">Usage: hadoop archive -archiveName NAME <src>* <dest></span> |
---|
| 438 | |
---|
| 439 | </p> |
---|
| 440 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 441 | |
---|
| 442 | <tr> |
---|
| 443 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 444 | </tr> |
---|
| 445 | |
---|
| 446 | <tr> |
---|
| 447 | |
---|
| 448 | <td colspan="1" rowspan="1"><span class="codefrag">-archiveName NAME</span></td> |
---|
| 449 | <td colspan="1" rowspan="1">Name of the archive to be created.</td> |
---|
| 450 | |
---|
| 451 | </tr> |
---|
| 452 | |
---|
| 453 | <tr> |
---|
| 454 | |
---|
| 455 | <td colspan="1" rowspan="1"><span class="codefrag">src</span></td> |
---|
| 456 | <td colspan="1" rowspan="1">Filesystem pathnames which work as usual with regular expressions.</td> |
---|
| 457 | |
---|
| 458 | </tr> |
---|
| 459 | |
---|
| 460 | <tr> |
---|
| 461 | |
---|
| 462 | <td colspan="1" rowspan="1"><span class="codefrag">dest</span></td> |
---|
| 463 | <td colspan="1" rowspan="1">Destination directory which would contain the archive.</td> |
---|
| 464 | |
---|
| 465 | </tr> |
---|
| 466 | |
---|
| 467 | </table> |
---|
| 468 | <a name="N10157"></a><a name="distcp"></a> |
---|
| 469 | <h3 class="h4"> distcp </h3> |
---|
| 470 | <p> |
---|
| 471 | Copy file or directories recursively. More information can be found at <a href="distcp.html">Hadoop DistCp Guide</a>. |
---|
| 472 | </p> |
---|
| 473 | <p> |
---|
| 474 | |
---|
| 475 | <span class="codefrag">Usage: hadoop distcp <srcurl> <desturl></span> |
---|
| 476 | |
---|
| 477 | </p> |
---|
| 478 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 479 | |
---|
| 480 | <tr> |
---|
| 481 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 482 | </tr> |
---|
| 483 | |
---|
| 484 | |
---|
| 485 | <tr> |
---|
| 486 | |
---|
| 487 | <td colspan="1" rowspan="1"><span class="codefrag">srcurl</span></td> |
---|
| 488 | <td colspan="1" rowspan="1">Source Url</td> |
---|
| 489 | |
---|
| 490 | </tr> |
---|
| 491 | |
---|
| 492 | <tr> |
---|
| 493 | |
---|
| 494 | <td colspan="1" rowspan="1"><span class="codefrag">desturl</span></td> |
---|
| 495 | <td colspan="1" rowspan="1">Destination Url</td> |
---|
| 496 | |
---|
| 497 | </tr> |
---|
| 498 | |
---|
| 499 | </table> |
---|
| 500 | <a name="N10194"></a><a name="fs"></a> |
---|
| 501 | <h3 class="h4"> fs </h3> |
---|
| 502 | <p> |
---|
| 503 | |
---|
| 504 | <span class="codefrag">Usage: hadoop fs [</span><a href="commands_manual.html#Generic+Options">GENERIC_OPTIONS</a><span class="codefrag">] |
---|
| 505 | [COMMAND_OPTIONS]</span> |
---|
| 506 | |
---|
| 507 | </p> |
---|
| 508 | <p> |
---|
| 509 | Runs a generic filesystem user client. |
---|
| 510 | </p> |
---|
| 511 | <p> |
---|
| 512 | The various COMMAND_OPTIONS can be found at <a href="hdfs_shell.html">Hadoop FS Shell Guide</a>. |
---|
| 513 | </p> |
---|
| 514 | <a name="N101B0"></a><a name="fsck"></a> |
---|
| 515 | <h3 class="h4"> fsck </h3> |
---|
| 516 | <p> |
---|
| 517 | Runs a HDFS filesystem checking utility. See <a href="hdfs_user_guide.html#Fsck">Fsck</a> for more info. |
---|
| 518 | </p> |
---|
| 519 | <p> |
---|
| 520 | <span class="codefrag">Usage: hadoop fsck [</span><a href="commands_manual.html#Generic+Options">GENERIC_OPTIONS</a><span class="codefrag">] |
---|
| 521 | <path> [-move | -delete | -openforwrite] [-files [-blocks |
---|
| 522 | [-locations | -racks]]]</span> |
---|
| 523 | </p> |
---|
| 524 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 525 | |
---|
| 526 | <tr> |
---|
| 527 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 528 | </tr> |
---|
| 529 | |
---|
| 530 | <tr> |
---|
| 531 | |
---|
| 532 | <td colspan="1" rowspan="1"><span class="codefrag"><path></span></td> |
---|
| 533 | <td colspan="1" rowspan="1">Start checking from this path.</td> |
---|
| 534 | |
---|
| 535 | </tr> |
---|
| 536 | |
---|
| 537 | <tr> |
---|
| 538 | |
---|
| 539 | <td colspan="1" rowspan="1"><span class="codefrag">-move</span></td> |
---|
| 540 | <td colspan="1" rowspan="1">Move corrupted files to /lost+found</td> |
---|
| 541 | |
---|
| 542 | </tr> |
---|
| 543 | |
---|
| 544 | <tr> |
---|
| 545 | |
---|
| 546 | <td colspan="1" rowspan="1"><span class="codefrag">-delete</span></td> |
---|
| 547 | <td colspan="1" rowspan="1">Delete corrupted files.</td> |
---|
| 548 | |
---|
| 549 | </tr> |
---|
| 550 | |
---|
| 551 | <tr> |
---|
| 552 | |
---|
| 553 | <td colspan="1" rowspan="1"><span class="codefrag">-openforwrite</span></td> |
---|
| 554 | <td colspan="1" rowspan="1">Print out files opened for write.</td> |
---|
| 555 | |
---|
| 556 | </tr> |
---|
| 557 | |
---|
| 558 | <tr> |
---|
| 559 | |
---|
| 560 | <td colspan="1" rowspan="1"><span class="codefrag">-files</span></td> |
---|
| 561 | <td colspan="1" rowspan="1">Print out files being checked.</td> |
---|
| 562 | |
---|
| 563 | </tr> |
---|
| 564 | |
---|
| 565 | <tr> |
---|
| 566 | |
---|
| 567 | <td colspan="1" rowspan="1"><span class="codefrag">-blocks</span></td> |
---|
| 568 | <td colspan="1" rowspan="1">Print out block report.</td> |
---|
| 569 | |
---|
| 570 | </tr> |
---|
| 571 | |
---|
| 572 | <tr> |
---|
| 573 | |
---|
| 574 | <td colspan="1" rowspan="1"><span class="codefrag">-locations</span></td> |
---|
| 575 | <td colspan="1" rowspan="1">Print out locations for every block.</td> |
---|
| 576 | |
---|
| 577 | </tr> |
---|
| 578 | |
---|
| 579 | <tr> |
---|
| 580 | |
---|
| 581 | <td colspan="1" rowspan="1"><span class="codefrag">-racks</span></td> |
---|
| 582 | <td colspan="1" rowspan="1">Print out network topology for data-node locations.</td> |
---|
| 583 | |
---|
| 584 | </tr> |
---|
| 585 | |
---|
| 586 | </table> |
---|
| 587 | <a name="N10244"></a><a name="jar"></a> |
---|
| 588 | <h3 class="h4"> jar </h3> |
---|
| 589 | <p> |
---|
| 590 | Runs a jar file. Users can bundle their Map Reduce code in a jar file and execute it using this command. |
---|
| 591 | </p> |
---|
| 592 | <p> |
---|
| 593 | |
---|
| 594 | <span class="codefrag">Usage: hadoop jar <jar> [mainClass] args...</span> |
---|
| 595 | |
---|
| 596 | </p> |
---|
| 597 | <p> |
---|
| 598 | The streaming jobs are run via this command. Examples can be referred from |
---|
| 599 | <a href="streaming.html#More+usage+examples">Streaming examples</a> |
---|
| 600 | |
---|
| 601 | </p> |
---|
| 602 | <p> |
---|
| 603 | Word count example is also run using jar command. It can be referred from |
---|
| 604 | <a href="mapred_tutorial.html#Usage">Wordcount example</a> |
---|
| 605 | |
---|
| 606 | </p> |
---|
| 607 | <a name="N10262"></a><a name="job"></a> |
---|
| 608 | <h3 class="h4"> job </h3> |
---|
| 609 | <p> |
---|
| 610 | Command to interact with Map Reduce Jobs. |
---|
| 611 | </p> |
---|
| 612 | <p> |
---|
| 613 | |
---|
| 614 | <span class="codefrag">Usage: hadoop job [</span><a href="commands_manual.html#Generic+Options">GENERIC_OPTIONS</a><span class="codefrag">] |
---|
| 615 | [-submit <job-file>] | [-status <job-id>] | |
---|
| 616 | [-counter <job-id> <group-name> <counter-name>] | [-kill <job-id>] | |
---|
| 617 | [-events <job-id> <from-event-#> <#-of-events>] | [-history [all] <jobOutputDir>] | |
---|
| 618 | [-list [all]] | [-kill-task <task-id>] | [-fail-task <task-id>] | |
---|
| 619 | [-set-priority <job-id> <priority>]</span> |
---|
| 620 | |
---|
| 621 | </p> |
---|
| 622 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 623 | |
---|
| 624 | <tr> |
---|
| 625 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 626 | </tr> |
---|
| 627 | |
---|
| 628 | |
---|
| 629 | <tr> |
---|
| 630 | |
---|
| 631 | <td colspan="1" rowspan="1"><span class="codefrag">-submit <job-file></span></td> |
---|
| 632 | <td colspan="1" rowspan="1">Submits the job.</td> |
---|
| 633 | |
---|
| 634 | </tr> |
---|
| 635 | |
---|
| 636 | <tr> |
---|
| 637 | |
---|
| 638 | <td colspan="1" rowspan="1"><span class="codefrag">-status <job-id></span></td> |
---|
| 639 | <td colspan="1" rowspan="1">Prints the map and reduce completion percentage and all job counters.</td> |
---|
| 640 | |
---|
| 641 | </tr> |
---|
| 642 | |
---|
| 643 | <tr> |
---|
| 644 | |
---|
| 645 | <td colspan="1" rowspan="1"><span class="codefrag">-counter <job-id> <group-name> <counter-name></span></td> |
---|
| 646 | <td colspan="1" rowspan="1">Prints the counter value.</td> |
---|
| 647 | |
---|
| 648 | </tr> |
---|
| 649 | |
---|
| 650 | <tr> |
---|
| 651 | |
---|
| 652 | <td colspan="1" rowspan="1"><span class="codefrag">-kill <job-id></span></td> |
---|
| 653 | <td colspan="1" rowspan="1">Kills the job.</td> |
---|
| 654 | |
---|
| 655 | </tr> |
---|
| 656 | |
---|
| 657 | <tr> |
---|
| 658 | |
---|
| 659 | <td colspan="1" rowspan="1"><span class="codefrag">-events <job-id> <from-event-#> <#-of-events></span></td> |
---|
| 660 | <td colspan="1" rowspan="1">Prints the events' details received by jobtracker for the given range.</td> |
---|
| 661 | |
---|
| 662 | </tr> |
---|
| 663 | |
---|
| 664 | <tr> |
---|
| 665 | |
---|
| 666 | <td colspan="1" rowspan="1"><span class="codefrag">-history [all] <jobOutputDir></span></td> |
---|
| 667 | <td colspan="1" rowspan="1">-history <jobOutputDir> prints job details, failed and killed tip details. More details |
---|
| 668 | about the job such as successful tasks and task attempts made for each task can be viewed by |
---|
| 669 | specifying the [all] option. </td> |
---|
| 670 | |
---|
| 671 | </tr> |
---|
| 672 | |
---|
| 673 | <tr> |
---|
| 674 | |
---|
| 675 | <td colspan="1" rowspan="1"><span class="codefrag">-list [all]</span></td> |
---|
| 676 | <td colspan="1" rowspan="1">-list all displays all jobs. -list displays only jobs which are yet to complete.</td> |
---|
| 677 | |
---|
| 678 | </tr> |
---|
| 679 | |
---|
| 680 | <tr> |
---|
| 681 | |
---|
| 682 | <td colspan="1" rowspan="1"><span class="codefrag">-kill-task <task-id></span></td> |
---|
| 683 | <td colspan="1" rowspan="1">Kills the task. Killed tasks are NOT counted against failed attempts.</td> |
---|
| 684 | |
---|
| 685 | </tr> |
---|
| 686 | |
---|
| 687 | <tr> |
---|
| 688 | |
---|
| 689 | <td colspan="1" rowspan="1"><span class="codefrag">-fail-task <task-id></span></td> |
---|
| 690 | <td colspan="1" rowspan="1">Fails the task. Failed tasks are counted against failed attempts.</td> |
---|
| 691 | |
---|
| 692 | </tr> |
---|
| 693 | |
---|
| 694 | <tr> |
---|
| 695 | |
---|
| 696 | <td colspan="1" rowspan="1"><span class="codefrag">-set-priority <job-id> <priority></span></td> |
---|
| 697 | <td colspan="1" rowspan="1">Changes the priority of the job. |
---|
| 698 | Allowed priority values are VERY_HIGH, HIGH, NORMAL, LOW, VERY_LOW</td> |
---|
| 699 | |
---|
| 700 | </tr> |
---|
| 701 | |
---|
| 702 | </table> |
---|
| 703 | <a name="N10310"></a><a name="pipes"></a> |
---|
| 704 | <h3 class="h4"> pipes </h3> |
---|
| 705 | <p> |
---|
| 706 | Runs a pipes job. |
---|
| 707 | </p> |
---|
| 708 | <p> |
---|
| 709 | |
---|
| 710 | <span class="codefrag">Usage: hadoop pipes [-conf <path>] [-jobconf <key=value>, <key=value>, ...] |
---|
| 711 | [-input <path>] [-output <path>] [-jar <jar file>] [-inputformat <class>] |
---|
| 712 | [-map <class>] [-partitioner <class>] [-reduce <class>] [-writer <class>] |
---|
| 713 | [-program <executable>] [-reduces <num>] </span> |
---|
| 714 | |
---|
| 715 | </p> |
---|
| 716 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 717 | |
---|
| 718 | <tr> |
---|
| 719 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 720 | </tr> |
---|
| 721 | |
---|
| 722 | |
---|
| 723 | <tr> |
---|
| 724 | |
---|
| 725 | <td colspan="1" rowspan="1"><span class="codefrag">-conf <path></span></td> |
---|
| 726 | <td colspan="1" rowspan="1">Configuration for job</td> |
---|
| 727 | |
---|
| 728 | </tr> |
---|
| 729 | |
---|
| 730 | <tr> |
---|
| 731 | |
---|
| 732 | <td colspan="1" rowspan="1"><span class="codefrag">-jobconf <key=value>, <key=value>, ...</span></td> |
---|
| 733 | <td colspan="1" rowspan="1">Add/override configuration for job</td> |
---|
| 734 | |
---|
| 735 | </tr> |
---|
| 736 | |
---|
| 737 | <tr> |
---|
| 738 | |
---|
| 739 | <td colspan="1" rowspan="1"><span class="codefrag">-input <path></span></td> |
---|
| 740 | <td colspan="1" rowspan="1">Input directory</td> |
---|
| 741 | |
---|
| 742 | </tr> |
---|
| 743 | |
---|
| 744 | <tr> |
---|
| 745 | |
---|
| 746 | <td colspan="1" rowspan="1"><span class="codefrag">-output <path></span></td> |
---|
| 747 | <td colspan="1" rowspan="1">Output directory</td> |
---|
| 748 | |
---|
| 749 | </tr> |
---|
| 750 | |
---|
| 751 | <tr> |
---|
| 752 | |
---|
| 753 | <td colspan="1" rowspan="1"><span class="codefrag">-jar <jar file></span></td> |
---|
| 754 | <td colspan="1" rowspan="1">Jar filename</td> |
---|
| 755 | |
---|
| 756 | </tr> |
---|
| 757 | |
---|
| 758 | <tr> |
---|
| 759 | |
---|
| 760 | <td colspan="1" rowspan="1"><span class="codefrag">-inputformat <class></span></td> |
---|
| 761 | <td colspan="1" rowspan="1">InputFormat class</td> |
---|
| 762 | |
---|
| 763 | </tr> |
---|
| 764 | |
---|
| 765 | <tr> |
---|
| 766 | |
---|
| 767 | <td colspan="1" rowspan="1"><span class="codefrag">-map <class></span></td> |
---|
| 768 | <td colspan="1" rowspan="1">Java Map class</td> |
---|
| 769 | |
---|
| 770 | </tr> |
---|
| 771 | |
---|
| 772 | <tr> |
---|
| 773 | |
---|
| 774 | <td colspan="1" rowspan="1"><span class="codefrag">-partitioner <class></span></td> |
---|
| 775 | <td colspan="1" rowspan="1">Java Partitioner</td> |
---|
| 776 | |
---|
| 777 | </tr> |
---|
| 778 | |
---|
| 779 | <tr> |
---|
| 780 | |
---|
| 781 | <td colspan="1" rowspan="1"><span class="codefrag">-reduce <class></span></td> |
---|
| 782 | <td colspan="1" rowspan="1">Java Reduce class</td> |
---|
| 783 | |
---|
| 784 | </tr> |
---|
| 785 | |
---|
| 786 | <tr> |
---|
| 787 | |
---|
| 788 | <td colspan="1" rowspan="1"><span class="codefrag">-writer <class></span></td> |
---|
| 789 | <td colspan="1" rowspan="1">Java RecordWriter</td> |
---|
| 790 | |
---|
| 791 | </tr> |
---|
| 792 | |
---|
| 793 | <tr> |
---|
| 794 | |
---|
| 795 | <td colspan="1" rowspan="1"><span class="codefrag">-program <executable></span></td> |
---|
| 796 | <td colspan="1" rowspan="1">Executable URI</td> |
---|
| 797 | |
---|
| 798 | </tr> |
---|
| 799 | |
---|
| 800 | <tr> |
---|
| 801 | |
---|
| 802 | <td colspan="1" rowspan="1"><span class="codefrag">-reduces <num></span></td> |
---|
| 803 | <td colspan="1" rowspan="1">Number of reduces</td> |
---|
| 804 | |
---|
| 805 | </tr> |
---|
| 806 | |
---|
| 807 | </table> |
---|
| 808 | <a name="N103D5"></a><a name="queue"></a> |
---|
| 809 | <h3 class="h4"> queue </h3> |
---|
| 810 | <p> |
---|
| 811 | command to interact and view Job Queue information |
---|
| 812 | </p> |
---|
| 813 | <p> |
---|
| 814 | |
---|
| 815 | <span class="codefrag">Usage : hadoop queue [-list] | [-info <job-queue-name> [-showJobs]]</span> |
---|
| 816 | |
---|
| 817 | </p> |
---|
| 818 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 819 | |
---|
| 820 | <tr> |
---|
| 821 | |
---|
| 822 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 823 | |
---|
| 824 | </tr> |
---|
| 825 | |
---|
| 826 | <tr> |
---|
| 827 | |
---|
| 828 | <td colspan="1" rowspan="1"><span class="codefrag">-list</span> </td> |
---|
| 829 | <td colspan="1" rowspan="1">Gets list of Job Queues configured in the system. Along with scheduling information |
---|
| 830 | associated with the job queues. |
---|
| 831 | </td> |
---|
| 832 | |
---|
| 833 | </tr> |
---|
| 834 | |
---|
| 835 | <tr> |
---|
| 836 | |
---|
| 837 | <td colspan="1" rowspan="1"><span class="codefrag">-info <job-queue-name> [-showJobs]</span></td> |
---|
| 838 | <td colspan="1" rowspan="1"> |
---|
| 839 | Displays the job queue information and associated scheduling information of particular |
---|
| 840 | job queue. If -showJobs options is present a list of jobs submitted to the particular job |
---|
| 841 | queue is displayed. |
---|
| 842 | </td> |
---|
| 843 | |
---|
| 844 | </tr> |
---|
| 845 | |
---|
| 846 | </table> |
---|
| 847 | <a name="N10411"></a><a name="version"></a> |
---|
| 848 | <h3 class="h4"> version </h3> |
---|
| 849 | <p> |
---|
| 850 | Prints the version. |
---|
| 851 | </p> |
---|
| 852 | <p> |
---|
| 853 | |
---|
| 854 | <span class="codefrag">Usage: hadoop version</span> |
---|
| 855 | |
---|
| 856 | </p> |
---|
| 857 | <a name="N10421"></a><a name="CLASSNAME"></a> |
---|
| 858 | <h3 class="h4"> CLASSNAME </h3> |
---|
| 859 | <p> |
---|
| 860 | hadoop script can be used to invoke any class. |
---|
| 861 | </p> |
---|
| 862 | <p> |
---|
| 863 | |
---|
| 864 | <span class="codefrag">Usage: hadoop CLASSNAME</span> |
---|
| 865 | |
---|
| 866 | </p> |
---|
| 867 | <p> |
---|
| 868 | Runs the class named CLASSNAME. |
---|
| 869 | </p> |
---|
| 870 | </div> |
---|
| 871 | |
---|
| 872 | <a name="N10435"></a><a name="Administration+Commands"></a> |
---|
| 873 | <h2 class="h3"> Administration Commands </h2> |
---|
| 874 | <div class="section"> |
---|
| 875 | <p>Commands useful for administrators of a hadoop cluster.</p> |
---|
| 876 | <a name="N1043E"></a><a name="balancer"></a> |
---|
| 877 | <h3 class="h4"> balancer </h3> |
---|
| 878 | <p> |
---|
| 879 | Runs a cluster balancing utility. An administrator can simply press Ctrl-C to stop the |
---|
| 880 | rebalancing process. See <a href="hdfs_user_guide.html#Rebalancer">Rebalancer</a> for more details. |
---|
| 881 | </p> |
---|
| 882 | <p> |
---|
| 883 | |
---|
| 884 | <span class="codefrag">Usage: hadoop balancer [-threshold <threshold>]</span> |
---|
| 885 | |
---|
| 886 | </p> |
---|
| 887 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 888 | |
---|
| 889 | <tr> |
---|
| 890 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 891 | </tr> |
---|
| 892 | |
---|
| 893 | |
---|
| 894 | <tr> |
---|
| 895 | |
---|
| 896 | <td colspan="1" rowspan="1"><span class="codefrag">-threshold <threshold></span></td> |
---|
| 897 | <td colspan="1" rowspan="1">Percentage of disk capacity. This overwrites the default threshold.</td> |
---|
| 898 | |
---|
| 899 | </tr> |
---|
| 900 | |
---|
| 901 | </table> |
---|
| 902 | <a name="N1046D"></a><a name="daemonlog"></a> |
---|
| 903 | <h3 class="h4"> daemonlog </h3> |
---|
| 904 | <p> |
---|
| 905 | Get/Set the log level for each daemon. |
---|
| 906 | </p> |
---|
| 907 | <p> |
---|
| 908 | |
---|
| 909 | <span class="codefrag">Usage: hadoop daemonlog -getlevel <host:port> <name></span> |
---|
| 910 | <br> |
---|
| 911 | |
---|
| 912 | <span class="codefrag">Usage: hadoop daemonlog -setlevel <host:port> <name> <level></span> |
---|
| 913 | |
---|
| 914 | </p> |
---|
| 915 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 916 | |
---|
| 917 | <tr> |
---|
| 918 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 919 | </tr> |
---|
| 920 | |
---|
| 921 | |
---|
| 922 | <tr> |
---|
| 923 | |
---|
| 924 | <td colspan="1" rowspan="1"><span class="codefrag">-getlevel <host:port> <name></span></td> |
---|
| 925 | <td colspan="1" rowspan="1">Prints the log level of the daemon running at <host:port>. |
---|
| 926 | This command internally connects to http://<host:port>/logLevel?log=<name></td> |
---|
| 927 | |
---|
| 928 | </tr> |
---|
| 929 | |
---|
| 930 | <tr> |
---|
| 931 | |
---|
| 932 | <td colspan="1" rowspan="1"><span class="codefrag">-setlevel <host:port> <name> <level></span></td> |
---|
| 933 | <td colspan="1" rowspan="1">Sets the log level of the daemon running at <host:port>. |
---|
| 934 | This command internally connects to http://<host:port>/logLevel?log=<name></td> |
---|
| 935 | |
---|
| 936 | </tr> |
---|
| 937 | |
---|
| 938 | </table> |
---|
| 939 | <a name="N104AA"></a><a name="datanode"></a> |
---|
| 940 | <h3 class="h4"> datanode</h3> |
---|
| 941 | <p> |
---|
| 942 | Runs a HDFS datanode. |
---|
| 943 | </p> |
---|
| 944 | <p> |
---|
| 945 | |
---|
| 946 | <span class="codefrag">Usage: hadoop datanode [-rollback]</span> |
---|
| 947 | |
---|
| 948 | </p> |
---|
| 949 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 950 | |
---|
| 951 | <tr> |
---|
| 952 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 953 | </tr> |
---|
| 954 | |
---|
| 955 | |
---|
| 956 | <tr> |
---|
| 957 | |
---|
| 958 | <td colspan="1" rowspan="1"><span class="codefrag">-rollback</span></td> |
---|
| 959 | <td colspan="1" rowspan="1">Rollsback the datanode to the previous version. This should be used after stopping the datanode |
---|
| 960 | and distributing the old hadoop version.</td> |
---|
| 961 | |
---|
| 962 | </tr> |
---|
| 963 | |
---|
| 964 | </table> |
---|
| 965 | <a name="N104D5"></a><a name="dfsadmin"></a> |
---|
| 966 | <h3 class="h4"> dfsadmin </h3> |
---|
| 967 | <p> |
---|
| 968 | Runs a HDFS dfsadmin client. |
---|
| 969 | </p> |
---|
| 970 | <p> |
---|
| 971 | |
---|
| 972 | <span class="codefrag">Usage: hadoop dfsadmin [</span><a href="commands_manual.html#Generic+Options">GENERIC_OPTIONS</a><span class="codefrag">] [-report] [-safemode enter | leave | get | wait] [-refreshNodes] |
---|
| 973 | [-finalizeUpgrade] [-upgradeProgress status | details | force] [-metasave filename] |
---|
| 974 | [-setQuota <quota> <dirname>...<dirname>] [-clrQuota <dirname>...<dirname>] |
---|
| 975 | [-help [cmd]]</span> |
---|
| 976 | |
---|
| 977 | </p> |
---|
| 978 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 979 | |
---|
| 980 | <tr> |
---|
| 981 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 982 | </tr> |
---|
| 983 | |
---|
| 984 | |
---|
| 985 | <tr> |
---|
| 986 | |
---|
| 987 | <td colspan="1" rowspan="1"><span class="codefrag">-report</span></td> |
---|
| 988 | <td colspan="1" rowspan="1">Reports basic filesystem information and statistics.</td> |
---|
| 989 | |
---|
| 990 | </tr> |
---|
| 991 | |
---|
| 992 | <tr> |
---|
| 993 | |
---|
| 994 | <td colspan="1" rowspan="1"><span class="codefrag">-safemode enter | leave | get | wait</span></td> |
---|
| 995 | <td colspan="1" rowspan="1">Safe mode maintenance command. |
---|
| 996 | Safe mode is a Namenode state in which it <br> |
---|
| 997 | 1. does not accept changes to the name space (read-only) <br> |
---|
| 998 | 2. does not replicate or delete blocks. <br> |
---|
| 999 | Safe mode is entered automatically at Namenode startup, and |
---|
| 1000 | leaves safe mode automatically when the configured minimum |
---|
| 1001 | percentage of blocks satisfies the minimum replication |
---|
| 1002 | condition. Safe mode can also be entered manually, but then |
---|
| 1003 | it can only be turned off manually as well.</td> |
---|
| 1004 | |
---|
| 1005 | </tr> |
---|
| 1006 | |
---|
| 1007 | <tr> |
---|
| 1008 | |
---|
| 1009 | <td colspan="1" rowspan="1"><span class="codefrag">-refreshNodes</span></td> |
---|
| 1010 | <td colspan="1" rowspan="1">Re-read the hosts and exclude files to update the set |
---|
| 1011 | of Datanodes that are allowed to connect to the Namenode |
---|
| 1012 | and those that should be decommissioned or recommissioned.</td> |
---|
| 1013 | |
---|
| 1014 | </tr> |
---|
| 1015 | |
---|
| 1016 | <tr> |
---|
| 1017 | |
---|
| 1018 | <td colspan="1" rowspan="1"><span class="codefrag">-finalizeUpgrade</span></td> |
---|
| 1019 | <td colspan="1" rowspan="1">Finalize upgrade of HDFS. |
---|
| 1020 | Datanodes delete their previous version working directories, |
---|
| 1021 | followed by Namenode doing the same. |
---|
| 1022 | This completes the upgrade process.</td> |
---|
| 1023 | |
---|
| 1024 | </tr> |
---|
| 1025 | |
---|
| 1026 | <tr> |
---|
| 1027 | |
---|
| 1028 | <td colspan="1" rowspan="1"><span class="codefrag">-upgradeProgress status | details | force</span></td> |
---|
| 1029 | <td colspan="1" rowspan="1">Request current distributed upgrade status, |
---|
| 1030 | a detailed status or force the upgrade to proceed.</td> |
---|
| 1031 | |
---|
| 1032 | </tr> |
---|
| 1033 | |
---|
| 1034 | <tr> |
---|
| 1035 | |
---|
| 1036 | <td colspan="1" rowspan="1"><span class="codefrag">-metasave filename</span></td> |
---|
| 1037 | <td colspan="1" rowspan="1">Save Namenode's primary data structures |
---|
| 1038 | to <filename> in the directory specified by hadoop.log.dir property. |
---|
| 1039 | <filename> will contain one line for each of the following <br> |
---|
| 1040 | 1. Datanodes heart beating with Namenode<br> |
---|
| 1041 | 2. Blocks waiting to be replicated<br> |
---|
| 1042 | 3. Blocks currrently being replicated<br> |
---|
| 1043 | 4. Blocks waiting to be deleted</td> |
---|
| 1044 | |
---|
| 1045 | </tr> |
---|
| 1046 | |
---|
| 1047 | <tr> |
---|
| 1048 | |
---|
| 1049 | <td colspan="1" rowspan="1"><span class="codefrag">-setQuota <quota> <dirname>...<dirname></span></td> |
---|
| 1050 | <td colspan="1" rowspan="1">Set the quota <quota> for each directory <dirname>. |
---|
| 1051 | The directory quota is a long integer that puts a hard limit on the number of names in the directory tree.<br> |
---|
| 1052 | Best effort for the directory, with faults reported if<br> |
---|
| 1053 | 1. N is not a positive integer, or<br> |
---|
| 1054 | 2. user is not an administrator, or<br> |
---|
| 1055 | 3. the directory does not exist or is a file, or<br> |
---|
| 1056 | 4. the directory would immediately exceed the new quota.</td> |
---|
| 1057 | |
---|
| 1058 | </tr> |
---|
| 1059 | |
---|
| 1060 | <tr> |
---|
| 1061 | |
---|
| 1062 | <td colspan="1" rowspan="1"><span class="codefrag">-clrQuota <dirname>...<dirname></span></td> |
---|
| 1063 | <td colspan="1" rowspan="1">Clear the quota for each directory <dirname>.<br> |
---|
| 1064 | Best effort for the directory. with fault reported if<br> |
---|
| 1065 | 1. the directory does not exist or is a file, or<br> |
---|
| 1066 | 2. user is not an administrator.<br> |
---|
| 1067 | It does not fault if the directory has no quota.</td> |
---|
| 1068 | |
---|
| 1069 | </tr> |
---|
| 1070 | |
---|
| 1071 | <tr> |
---|
| 1072 | |
---|
| 1073 | <td colspan="1" rowspan="1"><span class="codefrag">-help [cmd]</span></td> |
---|
| 1074 | <td colspan="1" rowspan="1"> Displays help for the given command or all commands if none |
---|
| 1075 | is specified.</td> |
---|
| 1076 | |
---|
| 1077 | </tr> |
---|
| 1078 | |
---|
| 1079 | </table> |
---|
| 1080 | <a name="N10595"></a><a name="jobtracker"></a> |
---|
| 1081 | <h3 class="h4"> jobtracker </h3> |
---|
| 1082 | <p> |
---|
| 1083 | Runs the MapReduce job Tracker node. |
---|
| 1084 | </p> |
---|
| 1085 | <p> |
---|
| 1086 | |
---|
| 1087 | <span class="codefrag">Usage: hadoop jobtracker</span> |
---|
| 1088 | |
---|
| 1089 | </p> |
---|
| 1090 | <a name="N105A5"></a><a name="namenode"></a> |
---|
| 1091 | <h3 class="h4"> namenode </h3> |
---|
| 1092 | <p> |
---|
| 1093 | Runs the namenode. More info about the upgrade, rollback and finalize is at |
---|
| 1094 | <a href="hdfs_user_guide.html#Upgrade+and+Rollback">Upgrade Rollback</a> |
---|
| 1095 | |
---|
| 1096 | </p> |
---|
| 1097 | <p> |
---|
| 1098 | |
---|
| 1099 | <span class="codefrag">Usage: hadoop namenode [-format] | [-upgrade] | [-rollback] | [-finalize] | [-importCheckpoint]</span> |
---|
| 1100 | |
---|
| 1101 | </p> |
---|
| 1102 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 1103 | |
---|
| 1104 | <tr> |
---|
| 1105 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 1106 | </tr> |
---|
| 1107 | |
---|
| 1108 | |
---|
| 1109 | <tr> |
---|
| 1110 | |
---|
| 1111 | <td colspan="1" rowspan="1"><span class="codefrag">-format</span></td> |
---|
| 1112 | <td colspan="1" rowspan="1">Formats the namenode. It starts the namenode, formats it and then shut it down.</td> |
---|
| 1113 | |
---|
| 1114 | </tr> |
---|
| 1115 | |
---|
| 1116 | <tr> |
---|
| 1117 | |
---|
| 1118 | <td colspan="1" rowspan="1"><span class="codefrag">-upgrade</span></td> |
---|
| 1119 | <td colspan="1" rowspan="1">Namenode should be started with upgrade option after the distribution of new hadoop version.</td> |
---|
| 1120 | |
---|
| 1121 | </tr> |
---|
| 1122 | |
---|
| 1123 | <tr> |
---|
| 1124 | |
---|
| 1125 | <td colspan="1" rowspan="1"><span class="codefrag">-rollback</span></td> |
---|
| 1126 | <td colspan="1" rowspan="1">Rollsback the namenode to the previous version. This should be used after stopping the cluster |
---|
| 1127 | and distributing the old hadoop version.</td> |
---|
| 1128 | |
---|
| 1129 | </tr> |
---|
| 1130 | |
---|
| 1131 | <tr> |
---|
| 1132 | |
---|
| 1133 | <td colspan="1" rowspan="1"><span class="codefrag">-finalize</span></td> |
---|
| 1134 | <td colspan="1" rowspan="1">Finalize will remove the previous state of the files system. Recent upgrade will become permanent. |
---|
| 1135 | Rollback option will not be available anymore. After finalization it shuts the namenode down.</td> |
---|
| 1136 | |
---|
| 1137 | </tr> |
---|
| 1138 | |
---|
| 1139 | <tr> |
---|
| 1140 | |
---|
| 1141 | <td colspan="1" rowspan="1"><span class="codefrag">-importCheckpoint</span></td> |
---|
| 1142 | <td colspan="1" rowspan="1">Loads image from a checkpoint directory and save it into the current one. Checkpoint dir |
---|
| 1143 | is read from property fs.checkpoint.dir</td> |
---|
| 1144 | |
---|
| 1145 | </tr> |
---|
| 1146 | |
---|
| 1147 | </table> |
---|
| 1148 | <a name="N1060C"></a><a name="secondarynamenode"></a> |
---|
| 1149 | <h3 class="h4"> secondarynamenode </h3> |
---|
| 1150 | <p> |
---|
| 1151 | Runs the HDFS secondary namenode. See <a href="hdfs_user_guide.html#Secondary+Namenode">Secondary Namenode</a> |
---|
| 1152 | for more info. |
---|
| 1153 | </p> |
---|
| 1154 | <p> |
---|
| 1155 | |
---|
| 1156 | <span class="codefrag">Usage: hadoop secondarynamenode [-checkpoint [force]] | [-geteditsize]</span> |
---|
| 1157 | |
---|
| 1158 | </p> |
---|
| 1159 | <table class="ForrestTable" cellspacing="1" cellpadding="4"> |
---|
| 1160 | |
---|
| 1161 | <tr> |
---|
| 1162 | <th colspan="1" rowspan="1"> COMMAND_OPTION </th><th colspan="1" rowspan="1"> Description </th> |
---|
| 1163 | </tr> |
---|
| 1164 | |
---|
| 1165 | |
---|
| 1166 | <tr> |
---|
| 1167 | |
---|
| 1168 | <td colspan="1" rowspan="1"><span class="codefrag">-checkpoint [force]</span></td> |
---|
| 1169 | <td colspan="1" rowspan="1">Checkpoints the Secondary namenode if EditLog size >= fs.checkpoint.size. |
---|
| 1170 | If -force is used, checkpoint irrespective of EditLog size.</td> |
---|
| 1171 | |
---|
| 1172 | </tr> |
---|
| 1173 | |
---|
| 1174 | <tr> |
---|
| 1175 | |
---|
| 1176 | <td colspan="1" rowspan="1"><span class="codefrag">-geteditsize</span></td> |
---|
| 1177 | <td colspan="1" rowspan="1">Prints the EditLog size.</td> |
---|
| 1178 | |
---|
| 1179 | </tr> |
---|
| 1180 | |
---|
| 1181 | </table> |
---|
| 1182 | <a name="N10649"></a><a name="tasktracker"></a> |
---|
| 1183 | <h3 class="h4"> tasktracker </h3> |
---|
| 1184 | <p> |
---|
| 1185 | Runs a MapReduce task Tracker node. |
---|
| 1186 | </p> |
---|
| 1187 | <p> |
---|
| 1188 | |
---|
| 1189 | <span class="codefrag">Usage: hadoop tasktracker</span> |
---|
| 1190 | |
---|
| 1191 | </p> |
---|
| 1192 | </div> |
---|
| 1193 | |
---|
| 1194 | |
---|
| 1195 | |
---|
| 1196 | |
---|
| 1197 | |
---|
| 1198 | </div> |
---|
| 1199 | <!--+ |
---|
| 1200 | |end content |
---|
| 1201 | +--> |
---|
| 1202 | <div class="clearboth"> </div> |
---|
| 1203 | </div> |
---|
| 1204 | <div id="footer"> |
---|
| 1205 | <!--+ |
---|
| 1206 | |start bottomstrip |
---|
| 1207 | +--> |
---|
| 1208 | <div class="lastmodified"> |
---|
| 1209 | <script type="text/javascript"><!-- |
---|
| 1210 | document.write("Last Published: " + document.lastModified); |
---|
| 1211 | // --></script> |
---|
| 1212 | </div> |
---|
| 1213 | <div class="copyright"> |
---|
| 1214 | Copyright © |
---|
| 1215 | 2008 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a> |
---|
| 1216 | </div> |
---|
| 1217 | <!--+ |
---|
| 1218 | |end bottomstrip |
---|
| 1219 | +--> |
---|
| 1220 | </div> |
---|
| 1221 | </body> |
---|
| 1222 | </html> |
---|