cluster_setup.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  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.7">
  7. <meta name="Forrest-skin-name" content="pelt">
  8. <title>Hadoop Cluster Setup</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. <div class="breadtrail">
  20. <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://lucene.apache.org/">Lucene</a> &gt; <a href="http://lucene.apache.org/hadoop/">Hadoop</a><script src="skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
  21. </div>
  22. <div class="header">
  23. <div class="grouplogo">
  24. <a href="http://lucene.apache.org/"><img class="logoImage" alt="Lucene" src="images/lucene_green_150.gif" title="Apache Lucene"></a>
  25. </div>
  26. <div class="projectlogo">
  27. <a href="http://lucene.apache.org/hadoop/"><img class="logoImage" alt="Hadoop" src="images/hadoop-logo.jpg" title="Scalable Computing Platform"></a>
  28. </div>
  29. <div class="searchbox">
  30. <form action="http://www.google.com/search" method="get" class="roundtopsmall">
  31. <input value="lucene.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;
  32. <input attr="value" name="Search" value="Search" type="submit">
  33. </form>
  34. </div>
  35. <ul id="tabs">
  36. <li>
  37. <a class="base-not-selected" href="http://lucene.apache.org/hadoop/">Project</a>
  38. </li>
  39. <li>
  40. <a class="base-not-selected" href="http://wiki.apache.org/lucene-hadoop">Wiki</a>
  41. </li>
  42. <li class="current">
  43. <a class="base-selected" href="index.html">Hadoop 0.16 Documentation</a>
  44. </li>
  45. </ul>
  46. </div>
  47. </div>
  48. <div id="main">
  49. <div id="publishedStrip">
  50. <div id="level2tabs"></div>
  51. <script type="text/javascript"><!--
  52. document.write("<text>Last Published:</text> " + document.lastModified);
  53. // --></script>
  54. </div>
  55. <div class="breadtrail">
  56. &nbsp;
  57. </div>
  58. <div id="menu">
  59. <div onclick="SwitchMenu('menu_selected_1.1', 'skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('skin/images/chapter_open.gif');">Documentation</div>
  60. <div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
  61. <div class="menuitem">
  62. <a href="index.html">Overview</a>
  63. </div>
  64. <div class="menuitem">
  65. <a href="quickstart.html">Quickstart</a>
  66. </div>
  67. <div class="menupage">
  68. <div class="menupagetitle">Cluster Setup</div>
  69. </div>
  70. <div class="menuitem">
  71. <a href="hdfs_design.html">HDFS Architecture</a>
  72. </div>
  73. <div class="menuitem">
  74. <a href="mapred_tutorial.html">Map-Reduce Tutorial</a>
  75. </div>
  76. <div class="menuitem">
  77. <a href="streaming.html">Streaming</a>
  78. </div>
  79. <div class="menuitem">
  80. <a href="hod.html">Hadoop On Demand</a>
  81. </div>
  82. <div class="menuitem">
  83. <a href="api/index.html">API Docs</a>
  84. </div>
  85. <div class="menuitem">
  86. <a href="http://wiki.apache.org/lucene-hadoop/">Wiki</a>
  87. </div>
  88. <div class="menuitem">
  89. <a href="http://wiki.apache.org/lucene-hadoop/FAQ">FAQ</a>
  90. </div>
  91. <div class="menuitem">
  92. <a href="http://lucene.apache.org/hadoop/mailing_lists.html">Mailing Lists</a>
  93. </div>
  94. </div>
  95. <div id="credit"></div>
  96. <div id="roundbottom">
  97. <img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
  98. <div id="credit2"></div>
  99. </div>
  100. <div id="content">
  101. <div title="Portable Document Format" class="pdflink">
  102. <a class="dida" href="cluster_setup.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br>
  103. PDF</a>
  104. </div>
  105. <h1>Hadoop Cluster Setup</h1>
  106. <div id="minitoc-area">
  107. <ul class="minitoc">
  108. <li>
  109. <a href="#Purpose">Purpose</a>
  110. </li>
  111. <li>
  112. <a href="#Pre-requisites">Pre-requisites</a>
  113. </li>
  114. <li>
  115. <a href="#Installation">Installation</a>
  116. </li>
  117. <li>
  118. <a href="#Configuration">Configuration</a>
  119. <ul class="minitoc">
  120. <li>
  121. <a href="#Configuration+Files">Configuration Files</a>
  122. </li>
  123. <li>
  124. <a href="#Site+Configuration">Site Configuration</a>
  125. <ul class="minitoc">
  126. <li>
  127. <a href="#Configuring+the+Environment+of+the+Hadoop+Daemons">Configuring the Environment of the Hadoop Daemons</a>
  128. </li>
  129. <li>
  130. <a href="#Configuring+the+Hadoop+Daemons">Configuring the Hadoop Daemons</a>
  131. </li>
  132. <li>
  133. <a href="#Slaves">Slaves</a>
  134. </li>
  135. <li>
  136. <a href="#Logging">Logging</a>
  137. </li>
  138. </ul>
  139. </li>
  140. </ul>
  141. </li>
  142. <li>
  143. <a href="#Hadoop+Startup">Hadoop Startup</a>
  144. </li>
  145. <li>
  146. <a href="#Hadoop+Shutdown">Hadoop Shutdown</a>
  147. </li>
  148. </ul>
  149. </div>
  150. <a name="N1000C"></a><a name="Purpose"></a>
  151. <h2 class="h3">Purpose</h2>
  152. <div class="section">
  153. <p>This document describes how to install, configure and manage non-trivial
  154. Hadoop clusters ranging from a few nodes to extremely large clusters with
  155. thousands of nodes.</p>
  156. <p>If you are looking to install Hadoop on a single machine to play
  157. with it, you can find relevant details <a href="quickstart.html">here</a>.
  158. </p>
  159. </div>
  160. <a name="N1001D"></a><a name="Pre-requisites"></a>
  161. <h2 class="h3">Pre-requisites</h2>
  162. <div class="section">
  163. <ol>
  164. <li>
  165. Make sure all <a href="quickstart.html#PreReqs">requisite</a> software
  166. is installed on all nodes in your cluster.
  167. </li>
  168. <li>
  169. <a href="quickstart.html#Download">Get</a> the Hadoop software.
  170. </li>
  171. </ol>
  172. </div>
  173. <a name="N10035"></a><a name="Installation"></a>
  174. <h2 class="h3">Installation</h2>
  175. <div class="section">
  176. <p>Installing a Hadoop cluster typically involves unpacking the software
  177. on all the machines in the cluster.</p>
  178. <p>Typically one machine in the cluster is designated as the
  179. <span class="codefrag">NameNode</span> and another machine the as <span class="codefrag">JobTracker</span>,
  180. exclusively. These are the <em>masters</em>. The rest of the machines in
  181. the cluster act as both <span class="codefrag">DataNode</span> <em>and</em>
  182. <span class="codefrag">TaskTracker</span>. These are the <em>slaves</em>.</p>
  183. <p>The root of the distribution is referred to as
  184. <span class="codefrag">HADOOP_HOME</span>. All machines in the cluster usually have the same
  185. <span class="codefrag">HADOOP_HOME</span> path.</p>
  186. </div>
  187. <a name="N10060"></a><a name="Configuration"></a>
  188. <h2 class="h3">Configuration</h2>
  189. <div class="section">
  190. <p>The following sections describe how to configure a Hadoop cluster.</p>
  191. <a name="N10069"></a><a name="Configuration+Files"></a>
  192. <h3 class="h4">Configuration Files</h3>
  193. <p>Hadoop configuration is driven by two important configuration files
  194. found in the <span class="codefrag">conf/</span> directory of the distribution:</p>
  195. <ol>
  196. <li>
  197. <a href="http://lucene.apache.org/hadoop/hadoop-default.html">hadoop-default.xml</a> - Read-only
  198. default configuration.
  199. </li>
  200. <li>
  201. <em>hadoop-site.xml</em> - Site-specific configuration.
  202. </li>
  203. </ol>
  204. <p>To learn more about how the Hadoop framework is controlled by these
  205. configuration files, look
  206. <a href="api/org/apache/hadoop/conf/Configuration.html">here</a>.</p>
  207. <p>Additionally, you can control the Hadoop scripts found in the
  208. <span class="codefrag">bin/</span> directory of the distribution, by setting site-specific
  209. values via the <span class="codefrag">conf/hadoop-env.sh</span>.</p>
  210. <a name="N10096"></a><a name="Site+Configuration"></a>
  211. <h3 class="h4">Site Configuration</h3>
  212. <p>To configure the the Hadoop cluster you will need to configure the
  213. <em>environment</em> in which the Hadoop daemons execute as well as
  214. the <em>configuration parameters</em> for the Hadoop daemons.</p>
  215. <p>The Hadoop daemons are <span class="codefrag">NameNode</span>/<span class="codefrag">DataNode</span>
  216. and <span class="codefrag">JobTracker</span>/<span class="codefrag">TaskTracker</span>.</p>
  217. <a name="N100B4"></a><a name="Configuring+the+Environment+of+the+Hadoop+Daemons"></a>
  218. <h4>Configuring the Environment of the Hadoop Daemons</h4>
  219. <p>Administrators should use the <span class="codefrag">conf/hadoop-env.sh</span> script
  220. to do site-specific customization of the Hadoop daemons' process
  221. environment.</p>
  222. <p>At the very least you should specify the
  223. <span class="codefrag">JAVA_HOME</span> so that it is correctly defined on each
  224. remote node.</p>
  225. <p>Other useful configuration parameters that you can customize
  226. include:</p>
  227. <ul>
  228. <li>
  229. <span class="codefrag">HADOOP_LOG_DIR</span> - The directory where the daemons'
  230. log files are stored. They are automatically created if they don't
  231. exist.
  232. </li>
  233. <li>
  234. <span class="codefrag">HADOOP_HEAPSIZE</span> - The maximum amount of heapsize
  235. to use, in MB e.g. <span class="codefrag">2000MB</span>.
  236. </li>
  237. </ul>
  238. <a name="N100DC"></a><a name="Configuring+the+Hadoop+Daemons"></a>
  239. <h4>Configuring the Hadoop Daemons</h4>
  240. <p>This section deals with important parameters to be specified in the
  241. <span class="codefrag">conf/hadoop-site.xml</span> for the Hadoop cluster.</p>
  242. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  243. <tr>
  244. <th colspan="1" rowspan="1">Parameter</th>
  245. <th colspan="1" rowspan="1">Value</th>
  246. <th colspan="1" rowspan="1">Notes</th>
  247. </tr>
  248. <tr>
  249. <td colspan="1" rowspan="1">fs.default.name</td>
  250. <td colspan="1" rowspan="1">Hostname or IP address of <span class="codefrag">NameNode</span>.</td>
  251. <td colspan="1" rowspan="1"><em>host:port</em> pair.</td>
  252. </tr>
  253. <tr>
  254. <td colspan="1" rowspan="1">mapred.job.tracker</td>
  255. <td colspan="1" rowspan="1">Hostname or IP address of <span class="codefrag">JobTracker</span>.</td>
  256. <td colspan="1" rowspan="1"><em>host:port</em> pair.</td>
  257. </tr>
  258. <tr>
  259. <td colspan="1" rowspan="1">dfs.name.dir</td>
  260. <td colspan="1" rowspan="1">
  261. Path on the local filesystem where the <span class="codefrag">NameNode</span>
  262. stores the namespace and transactions logs persistently.</td>
  263. <td colspan="1" rowspan="1">
  264. If this is a comma-delimited list of directories then the name
  265. table is replicated in all of the directories, for redundancy.
  266. </td>
  267. </tr>
  268. <tr>
  269. <td colspan="1" rowspan="1">dfs.data.dir</td>
  270. <td colspan="1" rowspan="1">
  271. Comma separated list of paths on the local filesystem of a
  272. <span class="codefrag">DataNode</span> where it should store its blocks.
  273. </td>
  274. <td colspan="1" rowspan="1">
  275. If this is a comma-delimited list of directories, then data will
  276. be stored in all named directories, typically on different
  277. devices.
  278. </td>
  279. </tr>
  280. <tr>
  281. <td colspan="1" rowspan="1">mapred.system.dir</td>
  282. <td colspan="1" rowspan="1">
  283. Path on the HDFS where where the Map-Reduce framework stores
  284. system files e.g. <span class="codefrag">/hadoop/mapred/system/</span>.
  285. </td>
  286. <td colspan="1" rowspan="1">
  287. This is in the default filesystem (HDFS) and must be accessible
  288. from both the server and client machines.
  289. </td>
  290. </tr>
  291. <tr>
  292. <td colspan="1" rowspan="1">mapred.local.dir</td>
  293. <td colspan="1" rowspan="1">
  294. Comma-separated list of paths on the local filesystem where
  295. temporary Map-Reduce data is written.
  296. </td>
  297. <td colspan="1" rowspan="1">Multiple paths help spread disk i/o.</td>
  298. </tr>
  299. <tr>
  300. <td colspan="1" rowspan="1">mapred.tasktracker.{map|reduce}.tasks.maximum</td>
  301. <td colspan="1" rowspan="1">
  302. The maximum number of map/reduce tasks, which are run
  303. simultaneously on a given <span class="codefrag">TaskTracker</span>, individually.
  304. </td>
  305. <td colspan="1" rowspan="1">
  306. Defaults to 2 (2 maps and 2 reduces), but vary it depending on
  307. your hardware.
  308. </td>
  309. </tr>
  310. <tr>
  311. <td colspan="1" rowspan="1">dfs.hosts/dfs.hosts.exclude</td>
  312. <td colspan="1" rowspan="1">List of permitted/excluded DataNodes.</td>
  313. <td colspan="1" rowspan="1">
  314. If necessary, use these files to control the list of allowable
  315. datanodes.
  316. </td>
  317. </tr>
  318. <tr>
  319. <td colspan="1" rowspan="1">mapred.hosts/mapred.hosts.exclude</td>
  320. <td colspan="1" rowspan="1">List of permitted/excluded TaskTrackers.</td>
  321. <td colspan="1" rowspan="1">
  322. If necessary, use these files to control the list of allowable
  323. tasktrackers.
  324. </td>
  325. </tr>
  326. </table>
  327. <p>Typically all the above parameters are marked as
  328. <a href="api/org/apache/hadoop/conf/Configuration.html#FinalParams">
  329. final</a> to ensure that they cannot be overriden by user-applications.
  330. </p>
  331. <a name="N101BC"></a><a name="Real-World+Cluster+Configurations"></a>
  332. <h5>Real-World Cluster Configurations</h5>
  333. <p>This section lists some non-default configuration parameters which
  334. have been used to run the <em>sort</em> benchmark on very large
  335. clusters.</p>
  336. <ul>
  337. <li>
  338. <p>Some non-default configuration values used to run sort900,
  339. that is 9TB of data sorted on a cluster with 900 nodes:</p>
  340. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  341. <tr>
  342. <th colspan="1" rowspan="1">Parameter</th>
  343. <th colspan="1" rowspan="1">Value</th>
  344. <th colspan="1" rowspan="1">Notes</th>
  345. </tr>
  346. <tr>
  347. <td colspan="1" rowspan="1">dfs.block.size</td>
  348. <td colspan="1" rowspan="1">134217728</td>
  349. <td colspan="1" rowspan="1">HDFS blocksize of 128MB for large file-systems.</td>
  350. </tr>
  351. <tr>
  352. <td colspan="1" rowspan="1">dfs.namenode.handler.count</td>
  353. <td colspan="1" rowspan="1">40</td>
  354. <td colspan="1" rowspan="1">
  355. More NameNode server threads to handle RPCs from large
  356. number of DataNodes.
  357. </td>
  358. </tr>
  359. <tr>
  360. <td colspan="1" rowspan="1">mapred.reduce.parallel.copies</td>
  361. <td colspan="1" rowspan="1">20</td>
  362. <td colspan="1" rowspan="1">
  363. Higher number of parallel copies run by reduces to fetch
  364. outputs from very large number of maps.
  365. </td>
  366. </tr>
  367. <tr>
  368. <td colspan="1" rowspan="1">mapred.child.java.opts</td>
  369. <td colspan="1" rowspan="1">-Xmx512M</td>
  370. <td colspan="1" rowspan="1">
  371. Larger heap-size for child jvms of maps/reduces.
  372. </td>
  373. </tr>
  374. <tr>
  375. <td colspan="1" rowspan="1">fs.inmemory.size.mb</td>
  376. <td colspan="1" rowspan="1">200</td>
  377. <td colspan="1" rowspan="1">
  378. Larger amount of memory allocated for the in-memory
  379. file-system used to merge map-outputs at the reduces.
  380. </td>
  381. </tr>
  382. <tr>
  383. <td colspan="1" rowspan="1">io.sort.factor</td>
  384. <td colspan="1" rowspan="1">100</td>
  385. <td colspan="1" rowspan="1">More streams merged at once while sorting files.</td>
  386. </tr>
  387. <tr>
  388. <td colspan="1" rowspan="1">io.sort.mb</td>
  389. <td colspan="1" rowspan="1">200</td>
  390. <td colspan="1" rowspan="1">Higher memory-limit while sorting data.</td>
  391. </tr>
  392. <tr>
  393. <td colspan="1" rowspan="1">io.file.buffer.size</td>
  394. <td colspan="1" rowspan="1">131072</td>
  395. <td colspan="1" rowspan="1">Size of read/write buffer used in SequenceFiles.</td>
  396. </tr>
  397. </table>
  398. </li>
  399. <li>
  400. <p>Updates to some configuration values to run sort1400 and
  401. sort2000, that is 14TB of data sorted on 1400 nodes and 20TB of
  402. data sorted on 2000 nodes:</p>
  403. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  404. <tr>
  405. <th colspan="1" rowspan="1">Parameter</th>
  406. <th colspan="1" rowspan="1">Value</th>
  407. <th colspan="1" rowspan="1">Notes</th>
  408. </tr>
  409. <tr>
  410. <td colspan="1" rowspan="1">mapred.job.tracker.handler.count</td>
  411. <td colspan="1" rowspan="1">60</td>
  412. <td colspan="1" rowspan="1">
  413. More JobTracker server threads to handle RPCs from large
  414. number of TaskTrackers.
  415. </td>
  416. </tr>
  417. <tr>
  418. <td colspan="1" rowspan="1">mapred.reduce.parallel.copies</td>
  419. <td colspan="1" rowspan="1">50</td>
  420. <td colspan="1" rowspan="1"></td>
  421. </tr>
  422. <tr>
  423. <td colspan="1" rowspan="1">tasktracker.http.threads</td>
  424. <td colspan="1" rowspan="1">50</td>
  425. <td colspan="1" rowspan="1">
  426. More worker threads for the TaskTracker's http server. The
  427. http server is used by reduces to fetch intermediate
  428. map-outputs.
  429. </td>
  430. </tr>
  431. <tr>
  432. <td colspan="1" rowspan="1">mapred.child.java.opts</td>
  433. <td colspan="1" rowspan="1">-Xmx1024M</td>
  434. <td colspan="1" rowspan="1"></td>
  435. </tr>
  436. </table>
  437. </li>
  438. </ul>
  439. <a name="N102D9"></a><a name="Slaves"></a>
  440. <h4>Slaves</h4>
  441. <p>Typically you choose one machine in the cluster to act as the
  442. <span class="codefrag">NameNode</span> and one machine as to act as the
  443. <span class="codefrag">JobTracker</span>, exclusively. The rest of the machines act as
  444. both a <span class="codefrag">DataNode</span> and <span class="codefrag">TaskTracker</span> and are
  445. referred to as <em>slaves</em>.</p>
  446. <p>List all slave hostnames or IP addresses in your
  447. <span class="codefrag">conf/slaves</span> file, one per line.</p>
  448. <a name="N102F8"></a><a name="Logging"></a>
  449. <h4>Logging</h4>
  450. <p>Hadoop uses the <a href="http://logging.apache.org/log4j/">Apache
  451. log4j</a> via the <a href="http://commons.apache.org/logging/">Apache
  452. Commons Logging</a> framework for logging. Edit the
  453. <span class="codefrag">conf/log4j.properties</span> file to customize the Hadoop
  454. daemons' logging configuration (log-formats and so on).</p>
  455. <p>Once all the necessary configuration is complete, distribute the files
  456. to the <span class="codefrag">HADOOP_CONF_DIR</span> directory on all the machines,
  457. typically <span class="codefrag">${HADOOP_HOME}/conf</span>.</p>
  458. </div>
  459. <a name="N10318"></a><a name="Hadoop+Startup"></a>
  460. <h2 class="h3">Hadoop Startup</h2>
  461. <div class="section">
  462. <p>To start a Hadoop cluster you will need to start both the HDFS and
  463. Map-Reduce cluster.</p>
  464. <p>
  465. Format a new distributed filesystem:<br>
  466. <span class="codefrag">$ bin/hadoop namenode -format</span>
  467. </p>
  468. <p>
  469. Start the HDFS with the following command, run on the designated
  470. <span class="codefrag">NameNode</span>:<br>
  471. <span class="codefrag">$ bin/start-dfs.sh</span>
  472. </p>
  473. <p>The <span class="codefrag">bin/start-dfs.sh</span> script also consults the
  474. <span class="codefrag">${HADOOP_CONF_DIR}/slaves</span> file on the <span class="codefrag">NameNode</span>
  475. and starts the <span class="codefrag">DataNode</span> daemon on all the listed slaves.</p>
  476. <p>
  477. Start Map-Reduce with the following command, run on the designated
  478. <span class="codefrag">JobTracker</span>:<br>
  479. <span class="codefrag">$ bin/start-mapred.sh</span>
  480. </p>
  481. <p>The <span class="codefrag">bin/start-mapred.sh</span> script also consults the
  482. <span class="codefrag">${HADOOP_CONF_DIR}/slaves</span> file on the <span class="codefrag">JobTracker</span>
  483. and starts the <span class="codefrag">TaskTracker</span> daemon on all the listed slaves.
  484. </p>
  485. </div>
  486. <a name="N1035E"></a><a name="Hadoop+Shutdown"></a>
  487. <h2 class="h3">Hadoop Shutdown</h2>
  488. <div class="section">
  489. <p>
  490. Stop HDFS with the following command, run on the designated
  491. <span class="codefrag">NameNode</span>:<br>
  492. <span class="codefrag">$ bin/stop-dfs.sh</span>
  493. </p>
  494. <p>The <span class="codefrag">bin/stop-dfs.sh</span> script also consults the
  495. <span class="codefrag">${HADOOP_CONF_DIR}/slaves</span> file on the <span class="codefrag">NameNode</span>
  496. and stops the <span class="codefrag">DataNode</span> daemon on all the listed slaves.</p>
  497. <p>
  498. Stop Map-Reduce with the following command, run on the designated
  499. the designated <span class="codefrag">JobTracker</span>:<br>
  500. <span class="codefrag">$ bin/stop-mapred.sh</span>
  501. <br>
  502. </p>
  503. <p>The <span class="codefrag">bin/stop-mapred.sh</span> script also consults the
  504. <span class="codefrag">${HADOOP_CONF_DIR}/slaves</span> file on the <span class="codefrag">JobTracker</span>
  505. and stops the <span class="codefrag">TaskTracker</span> daemon on all the listed slaves.</p>
  506. </div>
  507. </div>
  508. <div class="clearboth">&nbsp;</div>
  509. </div>
  510. <div id="footer">
  511. <div class="lastmodified">
  512. <script type="text/javascript"><!--
  513. document.write("<text>Last Published:</text> " + document.lastModified);
  514. // --></script>
  515. </div>
  516. <div class="copyright">
  517. Copyright &copy;
  518. 2007 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
  519. </div>
  520. </div>
  521. </body>
  522. </html>