diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index cdf0e9fbeee..2d6db54b2b7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -695,6 +695,9 @@ Release 2.7.0 - UNRELEASED HDFS-7788. Post-2.6 namenode may not start up with an image containing inodes created with an old release. (Rushabh Shah via kihwal) + HDFS-7814. Fix usage string of storageType parameter for + "dfsadmin -setSpaceQuota/clrSpaceQuota". (Xiaoyu Yao via cnauroth) + BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS HDFS-7720. Quota by Storage Type API, tools and ClientNameNode diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java index ae9088cd3e6..6ba778f3479 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java @@ -207,9 +207,9 @@ public class DFSAdmin extends FsShell { /** A class that supports command clearSpaceQuota */ private static class ClearSpaceQuotaCommand extends DFSAdminCommand { private static final String NAME = "clrSpaceQuota"; - private static final String USAGE = "-"+NAME+" ... -storageType "; + private static final String USAGE = "-"+NAME+" [-storageType ] ..."; private static final String DESCRIPTION = USAGE + ": " + - "Clear the disk space quota for each directory .\n" + + "Clear the space quota for each directory .\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" + @@ -259,9 +259,9 @@ public class DFSAdmin extends FsShell { private static class SetSpaceQuotaCommand extends DFSAdminCommand { private static final String NAME = "setSpaceQuota"; private static final String USAGE = - "-"+NAME+" ... -storageType "; + "-"+NAME+" [-storageType ] ..."; private static final String DESCRIPTION = USAGE + ": " + - "Set the disk space quota for each directory .\n" + + "Set the space quota for each directory .\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" + diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml index 4e1d7977445..7aac8490518 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml @@ -15521,7 +15521,7 @@ RegexpComparator - ^-setSpaceQuota <quota> <dirname>...<dirname> -storageType <storagetype>: Set the disk space quota <quota> for each directory <dirName>.( )* + ^-setSpaceQuota <quota> \[-storageType <storagetype>\] <dirname>...<dirname>: Set the space quota <quota> for each directory <dirName>.( )* RegexpComparator @@ -15556,7 +15556,7 @@ RegexpComparator - ^-clrSpaceQuota <dirname>...<dirname> -storageType <storagetype>: Clear the disk space quota for each directory <dirName>.( )* + ^-clrSpaceQuota \[-storageType <storagetype>\] <dirname>...<dirname>: Clear the space quota for each directory <dirName>.( )* RegexpComparator