Author: shv
Date: Fri Jun 26 00:34:46 2009
New Revision: 788555

URL: http://svn.apache.org/viewvc?rev=788555&view=rev
Log:
HDFS-352. Documentation for saveNamespace command. Contributed by Ravi Phulari.

Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    
hadoop/hdfs/trunk/src/docs/src/documentation/content/xdocs/commands_manual.xml
    hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
    hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=788555&r1=788554&r2=788555&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Fri Jun 26 00:34:46 2009
@@ -18,6 +18,8 @@
     HDFS-444. Allow to change probability levels dynamically in the fault
     injection framework.  (Konstantin Boudnik via szetszwo)
 
+    HDFS-352. Documentation for saveNamespace command. (Ravi Phulari via shv)
+
   BUG FIXES
     HDFS-76. Better error message to users when commands fail because of 
     lack of quota. Allow quota to be set even if the limit is lower than

Modified: 
hadoop/hdfs/trunk/src/docs/src/documentation/content/xdocs/commands_manual.xml
URL: 
http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/docs/src/documentation/content/xdocs/commands_manual.xml?rev=788555&r1=788554&r2=788555&view=diff
==============================================================================
--- 
hadoop/hdfs/trunk/src/docs/src/documentation/content/xdocs/commands_manual.xml 
(original)
+++ 
hadoop/hdfs/trunk/src/docs/src/documentation/content/xdocs/commands_manual.xml 
Fri Jun 26 00:34:46 2009
@@ -483,11 +483,11 @@
                                        Runs a HDFS dfsadmin client.
                                </p> 
                                <p>
-                                       <code>Usage: hadoop dfsadmin  
[</code><a 
href="commands_manual.html#Generic+Options">GENERIC_OPTIONS</a><code>] 
[-report] [-safemode enter | leave | get | wait] [-refreshNodes]
-                                        [-finalizeUpgrade] [-upgradeProgress 
status | details | force] [-metasave filename] 
-                                        [-setQuota &lt;quota&gt; 
&lt;dirname&gt;...&lt;dirname&gt;] [-clrQuota 
&lt;dirname&gt;...&lt;dirname&gt;] 
-                                        [-restoreFailedStorage 
true|false|check] 
-                                        [-help [cmd]]</code>
+                                       <code>Usage: hadoop dfsadmin  
[</code><a 
href="commands_manual.html#Generic+Options">GENERIC_OPTIONS</a><code>] 
+                                       [-report][-safemode enter | leave | get 
| wait] [-saveNamespace] [-restoreFailedStorage true|false|check] 
[-refreshNodes] [-finalizeUpgrade]
+                                       [-upgradeProgress status | details | 
force] [-metasave filename] [-refreshServiceAcl] [-printTopology] [-setQuota 
&lt;quota&gt; &lt;dirname&gt;...&lt;dirname&gt;]
+                                       [-clrQuota 
&lt;dirname&gt;...&lt;dirname&gt;] [-setSpaceQuota &lt;quota&gt; 
&lt;dirname&gt;...&lt;dirname&gt;] [-clrSpaceQuota 
&lt;dirname&gt;...&lt;dirname&gt;] [-help [cmd]]
+                                       </code>
                                </p>
                                <table>
                                  <tr><th> COMMAND_OPTION </th><th> Description 
</th></tr>
@@ -499,16 +499,70 @@
                                   <tr>
                                        <td><code>-safemode enter | leave | get 
| wait</code></td>
                                    <td>Safe mode maintenance command.
-                Safe mode is a Namenode state in which it <br/>
-                        1.  does not accept changes to the name space 
(read-only) <br/> 
-                        2.  does not replicate or delete blocks. <br/>
-                Safe mode is entered automatically at Namenode startup, and
-                leaves safe mode automatically when the configured minimum
-                percentage of blocks satisfies the minimum replication
-                condition.  Safe mode can also be entered manually, but then
+               Safe mode is a Namenode state in which it <br/>
+               1.  does not accept changes to the name space (read-only) <br/> 
+               2.  does not replicate or delete blocks. <br/>
+               Safe mode is entered automatically at Namenode startup, and
+               leaves safe mode automatically when the configured minimum
+               percentage of blocks satisfies the minimum replication
+               condition.  Safe mode can also be entered manually, but then
                 it can only be turned off manually as well.</td>
                                   </tr>
                                   <tr>
+                                     <td><code>-saveNamesapce</code></td>
+                                     <td>Save current namespace into storage 
directories and reset edits log.
+        Requires superuser permissions and safe mode.
+                                     </td>
+                                  </tr>
+                                  <tr>
+                                               <td><code> 
-restoreFailedStorage</code></td>
+                                               <td>  Set/Unset/Check flag to 
attempt restore of failed storage replicas if they become available.
+        Requires superuser permissions.</td>
+                                  </tr>
+                                  <tr>
+                                       <td><code>-refreshServiceAcl</code></td>
+                                       <td> Reload the service-level 
authorization policy file
+        Namenode will reload the authorization policy file</td>
+                                  </tr>
+                                  <tr>
+                                               <td><code>-setSpaceQuota 
&lt;quota> &lt;dirname&gt;...&lt;dirname&gt;</code></td>
+                                               <td>Set the disk space quota 
&lt;quota&gt; for each directory &lt;dirName&gt;. The directory quota is a long 
integer that puts a hard limit
+        on the number of names in the directory tree.
+        Quota can also be speciefied with a binary prefix for terabytes,
+        petabytes etc (e.g. 50t is 50TB, 5m is 5MB, 3p is 3PB).<br/>
+        For each directory, attempt to set the quota. An error will be 
reported if<br/>
+        1. N is not a positive integer, or<br/>
+        2. user is not an administrator, or<br/>
+        3. the directory does not exist or is a file, or<br/>
+        4. the directory would immediately exceed the new space quota.</td>
+                                  </tr>
+                                  <tr>
+                                               <td><code>-clrSpaceQuota 
&lt;dirname&gt;...&lt;dirname&gt;</code></td>
+                                               <td> Clear the disk space quota 
for each directory &lt;dirName&gt;.
+        For each directory, attempt to set the quota. An error will be 
reported if<br/>
+        1. the directory does not exist or is a file, or<br/>
+        2. user is not an administrator.<br/>
+        It does not fault if the directory has no quota.</td>
+                                  </tr>
+                                   <tr>
+                                       <td><code>-setQuota &lt;quota&gt; 
&lt;dirname&gt;...&lt;dirname&gt;</code></td>
+                                   <td>Set the quota &lt;quota&gt; for each 
directory &lt;dirname&gt;.
+         The directory quota is a long integer that puts a hard limit on the 
number of names in the directory tree.<br/>
+         For each directory, attempt to set the quota. An error will be 
reported if<br/>
+         1. N is not a positive integer, or<br/>
+         2. user is not an administrator, or<br/>
+         3. the directory does not exist or is a file, or<br/>
+         4. the directory would immediately exceed the new quota.</td>
+                                  </tr>
+                                  <tr>
+                                       <td><code>-clrQuota 
&lt;dirname&gt;...&lt;dirname&gt;</code></td>
+                                   <td>Clear the quota for each directory 
&lt;dirname&gt;.<br/>
+        For each directory, attempt to set the quota. An error will be 
reported if<br/>
+        1. the directory does not exist or is a file, or<br/>
+        2. user is not an administrator.<br/>
+        It does not fault if the directory has no quota.</td>
+                                  </tr>
+                                  <tr>
                                        <td><code>-refreshNodes</code></td>
                                    <td>Re-read the hosts and exclude files to 
update the set
                 of Datanodes that are allowed to connect to the Namenode
@@ -542,24 +596,6 @@
                         4. Blocks waiting to be deleted</td>
                                   </tr>
                                   <tr>
-                                       <td><code>-setQuota &lt;quota&gt; 
&lt;dirname&gt;...&lt;dirname&gt;</code></td>
-                                   <td>Set the quota &lt;quota&gt; for each 
directory &lt;dirname&gt;.
-                The directory quota is a long integer that puts a hard limit 
on the number of names in the directory tree.<br/>
-                Best effort for the directory, with faults reported if<br/>
-                1. N is not a positive integer, or<br/>
-                2. user is not an administrator, or<br/>
-                3. the directory does not exist or is a file, or<br/>
-                4. the directory would immediately exceed the new quota.</td>
-                                  </tr>
-                                  <tr>
-                                       <td><code>-clrQuota 
&lt;dirname&gt;...&lt;dirname&gt;</code></td>
-                                   <td>Clear the quota for each directory 
&lt;dirname&gt;.<br/>
-                Best effort for the directory. with fault reported if<br/>
-                1. the directory does not exist or is a file, or<br/>
-                2. user is not an administrator.<br/>
-                It does not fault if the directory has no quota.</td>
-                                  </tr>
-                                  <tr>
                                        <td><code>-restoreFailedStorage true | 
false | check</code></td>
                                    <td>This option will turn on/off automatic 
attempt to restore failed storage replicas. 
                                    If a failed storage becomes available again 
the system will attempt to restore 

Modified: hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
URL: 
http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java?rev=788555&r1=788554&r2=788555&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java 
(original)
+++ hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java Fri 
Jun 26 00:34:46 2009
@@ -76,7 +76,7 @@
     private static final String USAGE = "-"+NAME+" <dirname>...<dirname>";
     private static final String DESCRIPTION = USAGE + ": " +
     "Clear the quota for each directory <dirName>.\n" +
-    "\t\tBest effort for the directory. with fault reported if\n" +
+    "\t\tFor each directory, attempt to clear the quota. An error will be 
reported if\n" +
     "\t\t1. the directory does not exist or is a file, or\n" +
     "\t\t2. user is not an administrator.\n" +
     "\t\tIt does not fault if the directory has no quota.";
@@ -119,7 +119,7 @@
       "Set the quota <quota> for each directory <dirName>.\n" + 
       "\t\tThe directory quota is a long integer that puts a hard limit\n" +
       "\t\ton the number of names in the directory tree\n" +
-      "\t\tBest effort for the directory, with faults reported if\n" +
+      "\t\tFor each directory, attempt to set the quota. An error will be 
reported if\n" +
       "\t\t1. N is not a positive integer, or\n" +
       "\t\t2. user is not an administrator, or\n" +
       "\t\t3. the directory does not exist or is a file, or\n";
@@ -161,7 +161,7 @@
     private static final String USAGE = "-"+NAME+" <dirname>...<dirname>";
     private static final String DESCRIPTION = USAGE + ": " +
     "Clear the disk space quota for each directory <dirName>.\n" +
-    "\t\tBest effort for the directory. with fault reported if\n" +
+    "\t\tFor each directory, attempt to clear the quota. An error will be 
reported if\n" +
     "\t\t1. the directory does not exist or is a file, or\n" +
     "\t\t2. user is not an administrator.\n" +
     "\t\tIt does not fault if the directory has no quota.";
@@ -207,7 +207,7 @@
       "\t\ta 1GB file with replication of 3 consumes 3GB of the quota.\n\n" +
       "\t\tQuota can also be speciefied with a binary prefix for terabytes,\n" 
+
       "\t\tpetabytes etc (e.g. 50t is 50TB, 5m is 5MB, 3p is 3PB).\n" + 
-      "\t\tBest effort for the directory, with faults reported if\n" +
+      "\t\tFor each directory, attempt to set the quota. An error will be 
reported if\n" +
       "\t\t1. N is not a positive integer, or\n" +
       "\t\t2. user is not an administrator, or\n" +
       "\t\t3. the directory does not exist or is a file, or\n";

Modified: hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml
URL: 
http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml?rev=788555&r1=788554&r2=788555&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml 
(original)
+++ hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml Fri 
Jun 26 00:34:46 2009
@@ -16006,7 +16006,7 @@
         </comparator>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^( |\t)*Best effort for the directory, with faults 
reported if( )*</expected-output>
+          <expected-output>^( |\t)*For each directory, attempt to set the 
quota. An error will be reported if( )*</expected-output>
         </comparator>
         <comparator>
           <type>RegexpComparator</type>
@@ -16037,7 +16037,7 @@
         </comparator>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^( |\t)*Best effort for the directory. with fault 
reported if( )*</expected-output>
+          <expected-output>^( |\t)*For each directory, attempt to clear the 
quota. An error will be reported if( )*</expected-output>
         </comparator>
         <comparator>
           <type>RegexpComparator</type>
@@ -16095,7 +16095,7 @@
         </comparator>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^( |\t)*Best effort for the directory. with fault 
reported if( )*</expected-output>
+          <expected-output>^( |\t)*For each directory, attempt to clear the 
quota. An error will be reported if( )*</expected-output>
         </comparator>
         <comparator>
           <type>RegexpComparator</type>


Reply via email to