Author: rangadi
Date: Wed Jun 24 20:57:13 2009
New Revision: 788181
URL: http://svn.apache.org/viewvc?rev=788181&view=rev
Log:
HDFS-438. Improve help message for space quota command. (Raghu Angadi)
Modified:
hadoop/common/branches/branch-0.20/CHANGES.txt
hadoop/common/branches/branch-0.20/src/docs/src/documentation/content/xdocs/hdfs_quota_admin_guide.xml
hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
Modified: hadoop/common/branches/branch-0.20/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/CHANGES.txt?rev=788181&r1=788180&r2=788181&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20/CHANGES.txt Wed Jun 24 20:57:13 2009
@@ -26,6 +26,8 @@
HADOOP-4372. Improves the way history filenames are obtained and
manipulated.
(Amar Kamat via ddas)
+ HDFS-438. Improve help message for space quota command. (Raghu Angadi)
+
OPTIMIZATIONS
BUG FIXES
Modified:
hadoop/common/branches/branch-0.20/src/docs/src/documentation/content/xdocs/hdfs_quota_admin_guide.xml
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/src/docs/src/documentation/content/xdocs/hdfs_quota_admin_guide.xml?rev=788181&r1=788180&r2=788181&view=diff
==============================================================================
---
hadoop/common/branches/branch-0.20/src/docs/src/documentation/content/xdocs/hdfs_quota_admin_guide.xml
(original)
+++
hadoop/common/branches/branch-0.20/src/docs/src/documentation/content/xdocs/hdfs_quota_admin_guide.xml
Wed Jun 24 20:57:13 2009
@@ -68,7 +68,8 @@
directory has no quota. </li>
<li> <code>dfsadmin -setSpaceQuota <N>
<directory>...<directory></code> <br /> Set the space quota to be
-N bytes for each directory. N can also be specified with a binary prefix for
convenience, for e.g. 50g for 50 gigabytes and
+N bytes for each directory. This is a hard limit on total size of all the
files under the directory tree.
+The space quota takes replication also into account, i.e. one GB of data with
replication of 3 consumes 3GB of quota. N can also be specified with a binary
prefix for convenience, for e.g. 50g for 50 gigabytes and
2t for 2 terabytes etc. Best effort for each directory, with faults reported
if <code>N</code> is
neither zero nor a positive integer, the directory does not exist or it is a
file, or the directory would immediately exceed
the new quota. </li>
Modified:
hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java?rev=788181&r1=788180&r2=788181&view=diff
==============================================================================
---
hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
(original)
+++
hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
Wed Jun 24 20:57:13 2009
@@ -196,8 +196,10 @@
"-"+NAME+" <quota> <dirname>...<dirname>";
private static final String DESCRIPTION = USAGE + ": " +
"Set the disk space 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\tThe space quota is a long integer that puts a hard limit\n" +
+ "\t\ton the total size of all the files under the directory tree.\n" +
+ "\t\tThe extra space required for replication is also counted. E.g.\n" +
+ "\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" +
@@ -492,13 +494,13 @@
System.out.println(upgradeProgress);
} else if ("metasave".equals(cmd)) {
System.out.println(metaSave);
- } else if (SetQuotaCommand.matches(cmd)) {
+ } else if (SetQuotaCommand.matches("-"+cmd)) {
System.out.println(SetQuotaCommand.DESCRIPTION);
- } else if (ClearQuotaCommand.matches(cmd)) {
+ } else if (ClearQuotaCommand.matches("-"+cmd)) {
System.out.println(ClearQuotaCommand.DESCRIPTION);
- } else if (SetSpaceQuotaCommand.matches(cmd)) {
+ } else if (SetSpaceQuotaCommand.matches("-"+cmd)) {
System.out.println(SetSpaceQuotaCommand.DESCRIPTION);
- } else if (ClearSpaceQuotaCommand.matches(cmd)) {
+ } else if (ClearSpaceQuotaCommand.matches("-"+cmd)) {
System.out.println(ClearSpaceQuotaCommand.DESCRIPTION);
} else if ("refreshServiceAcl".equals(cmd)) {
System.out.println(refreshServiceAcl);