hdfs_quota_admin_guide.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta content="Apache Forrest" name="Generator">
  6. <meta name="Forrest-version" content="0.8">
  7. <meta name="Forrest-skin-name" content="pelt">
  8. <title>
  9. Name Space Quotas Administrator Guide
  10. </title>
  11. <link type="text/css" href="skin/basic.css" rel="stylesheet">
  12. <link media="screen" type="text/css" href="skin/screen.css" rel="stylesheet">
  13. <link media="print" type="text/css" href="skin/print.css" rel="stylesheet">
  14. <link type="text/css" href="skin/profile.css" rel="stylesheet">
  15. <script src="skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="skin/fontsize.js" language="javascript" type="text/javascript"></script>
  16. <link rel="shortcut icon" href="images/favicon.ico">
  17. </head>
  18. <body onload="init()">
  19. <script type="text/javascript">ndeSetTextSize();</script>
  20. <div id="top">
  21. <!--+
  22. |breadtrail
  23. +-->
  24. <div class="breadtrail">
  25. <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://hadoop.apache.org/">Hadoop</a> &gt; <a href="http://hadoop.apache.org/core/">Core</a><script src="skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
  26. </div>
  27. <!--+
  28. |header
  29. +-->
  30. <div class="header">
  31. <!--+
  32. |start group logo
  33. +-->
  34. <div class="grouplogo">
  35. <a href="http://hadoop.apache.org/"><img class="logoImage" alt="Hadoop" src="images/hadoop-logo.jpg" title="Apache Hadoop"></a>
  36. </div>
  37. <!--+
  38. |end group logo
  39. +-->
  40. <!--+
  41. |start Project Logo
  42. +-->
  43. <div class="projectlogo">
  44. <a href="http://hadoop.apache.org/core/"><img class="logoImage" alt="Hadoop" src="images/core-logo.gif" title="Scalable Computing Platform"></a>
  45. </div>
  46. <!--+
  47. |end Project Logo
  48. +-->
  49. <!--+
  50. |start Search
  51. +-->
  52. <div class="searchbox">
  53. <form action="http://www.google.com/search" method="get" class="roundtopsmall">
  54. <input value="hadoop.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp;
  55. <input name="Search" value="Search" type="submit">
  56. </form>
  57. </div>
  58. <!--+
  59. |end search
  60. +-->
  61. <!--+
  62. |start Tabs
  63. +-->
  64. <ul id="tabs">
  65. <li>
  66. <a class="unselected" href="http://hadoop.apache.org/core/">Project</a>
  67. </li>
  68. <li>
  69. <a class="unselected" href="http://wiki.apache.org/hadoop">Wiki</a>
  70. </li>
  71. <li class="current">
  72. <a class="selected" href="index.html">Hadoop 0.18 Documentation</a>
  73. </li>
  74. </ul>
  75. <!--+
  76. |end Tabs
  77. +-->
  78. </div>
  79. </div>
  80. <div id="main">
  81. <div id="publishedStrip">
  82. <!--+
  83. |start Subtabs
  84. +-->
  85. <div id="level2tabs"></div>
  86. <!--+
  87. |end Endtabs
  88. +-->
  89. <script type="text/javascript"><!--
  90. document.write("Last Published: " + document.lastModified);
  91. // --></script>
  92. </div>
  93. <!--+
  94. |breadtrail
  95. +-->
  96. <div class="breadtrail">
  97. &nbsp;
  98. </div>
  99. <!--+
  100. |start Menu, mainarea
  101. +-->
  102. <!--+
  103. |start Menu
  104. +-->
  105. <div id="menu">
  106. <div onclick="SwitchMenu('menu_selected_1.1', 'skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('skin/images/chapter_open.gif');">Documentation</div>
  107. <div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
  108. <div class="menuitem">
  109. <a href="index.html">Overview</a>
  110. </div>
  111. <div class="menuitem">
  112. <a href="quickstart.html">Quickstart</a>
  113. </div>
  114. <div class="menuitem">
  115. <a href="cluster_setup.html">Cluster Setup</a>
  116. </div>
  117. <div class="menuitem">
  118. <a href="hdfs_design.html">HDFS Architecture</a>
  119. </div>
  120. <div class="menuitem">
  121. <a href="hdfs_user_guide.html">HDFS User Guide</a>
  122. </div>
  123. <div class="menuitem">
  124. <a href="hdfs_permissions_guide.html">HDFS Permissions Guide</a>
  125. </div>
  126. <div class="menupage">
  127. <div class="menupagetitle">HDFS Quotas Administrator Guide</div>
  128. </div>
  129. <div class="menuitem">
  130. <a href="commands_manual.html">Commands Manual</a>
  131. </div>
  132. <div class="menuitem">
  133. <a href="hdfs_shell.html">FS Shell Guide</a>
  134. </div>
  135. <div class="menuitem">
  136. <a href="distcp.html">DistCp Guide</a>
  137. </div>
  138. <div class="menuitem">
  139. <a href="mapred_tutorial.html">Map-Reduce Tutorial</a>
  140. </div>
  141. <div class="menuitem">
  142. <a href="native_libraries.html">Native Hadoop Libraries</a>
  143. </div>
  144. <div class="menuitem">
  145. <a href="streaming.html">Streaming</a>
  146. </div>
  147. <div class="menuitem">
  148. <a href="hadoop_archives.html">Hadoop Archives</a>
  149. </div>
  150. <div class="menuitem">
  151. <a href="hod.html">Hadoop On Demand</a>
  152. </div>
  153. <div class="menuitem">
  154. <a href="api/index.html">API Docs</a>
  155. </div>
  156. <div class="menuitem">
  157. <a href="jdiff/changes.html">API Changes</a>
  158. </div>
  159. <div class="menuitem">
  160. <a href="http://wiki.apache.org/hadoop/">Wiki</a>
  161. </div>
  162. <div class="menuitem">
  163. <a href="http://wiki.apache.org/hadoop/FAQ">FAQ</a>
  164. </div>
  165. <div class="menuitem">
  166. <a href="http://hadoop.apache.org/core/mailing_lists.html">Mailing Lists</a>
  167. </div>
  168. <div class="menuitem">
  169. <a href="releasenotes.html">Release Notes</a>
  170. </div>
  171. <div class="menuitem">
  172. <a href="changes.html">All Changes</a>
  173. </div>
  174. </div>
  175. <div id="credit"></div>
  176. <div id="roundbottom">
  177. <img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
  178. <!--+
  179. |alternative credits
  180. +-->
  181. <div id="credit2"></div>
  182. </div>
  183. <!--+
  184. |end Menu
  185. +-->
  186. <!--+
  187. |start content
  188. +-->
  189. <div id="content">
  190. <div title="Portable Document Format" class="pdflink">
  191. <a class="dida" href="hdfs_quota_admin_guide.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br>
  192. PDF</a>
  193. </div>
  194. <h1>
  195. Name Space Quotas Administrator Guide
  196. </h1>
  197. <p>
  198. The Hadoop Distributed File System (HDFS) allows the administrator to set quotas on individual directories.
  199. Newly created directories have no associated quota.
  200. The largest quota is <span class="codefrag">Long.Max_Value</span>. A quota of one forces a directory
  201. to remain empty.
  202. </p>
  203. <p>
  204. The directory quota is a hard limit on the number of names in the tree
  205. rooted at that directory. File and directory creations fault if the quota
  206. would be exceeded. Quotas stick to renamed directories; the rename
  207. operation faults if operation would result in a quota violation.
  208. The attempt to set a quota faults if the directory would be in violation
  209. of the new quota.
  210. </p>
  211. <p>
  212. Quotas are persistent with the fsimage. When starting, if the fsimage
  213. is immediately in violation of a quota (perhaps the fsimage was
  214. surreptitiously modified), the startup operation fails with an error report.
  215. Setting or removing a quota creates a journal entry.
  216. </p>
  217. <p>
  218. The following new commands or new options are added to support quotas.
  219. The first two are administration commands.
  220. </p>
  221. <ul>
  222. <li>
  223. <span class="codefrag">dfsadmin -setquota &lt;N&gt; &lt;directory&gt;...&lt;directory&gt;</span>
  224. <br>
  225. Set the quota to be <span class="codefrag">N</span> for each directory. Best effort for each directory,
  226. with faults reported if <span class="codefrag">N</span> is not a positive long integer,
  227. the directory does not exist or it is a file, or the directory would
  228. immediately exceed the new quota.
  229. </li>
  230. <li>
  231. <span class="codefrag">dfsadmin -clrquota &lt;directory&gt;...&lt;director&gt;</span>
  232. <br>
  233. Remove any quota for each directory. Best effort for each directory,
  234. with faults reported if the directory does not exist or it is a file.
  235. It is not a fault if the directory has no quota.
  236. </li>
  237. <li>
  238. <span class="codefrag">fs -count -q &lt;directory&gt;...&lt;directory&gt;</span>
  239. <br>
  240. With the <span class="codefrag">-q</span> option, also report the quota value set for each
  241. directory, and the available quota remaining. If the directory does not have
  242. a quota set, the reported values are <span class="codefrag">none</span> and <span class="codefrag">inf</span>.
  243. </li>
  244. </ul>
  245. </div>
  246. <!--+
  247. |end content
  248. +-->
  249. <div class="clearboth">&nbsp;</div>
  250. </div>
  251. <div id="footer">
  252. <!--+
  253. |start bottomstrip
  254. +-->
  255. <div class="lastmodified">
  256. <script type="text/javascript"><!--
  257. document.write("Last Published: " + document.lastModified);
  258. // --></script>
  259. </div>
  260. <div class="copyright">
  261. Copyright &copy;
  262. 2007 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
  263. </div>
  264. <!--+
  265. |end bottomstrip
  266. +-->
  267. </div>
  268. </body>
  269. </html>