From ab49c2b39943eb5a3510d22c09ae5630232bdddc Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Thu, 28 Jul 2016 16:58:23 +0900 Subject: [PATCH] HDFS-10696. TestHDFSCLI fails. Contributed by Kai Sasaki. (cherry picked from commit 414fbfab41470923eb82a21628709e51fd3a3f6e) --- .../apache/hadoop/hdfs/tools/DFSAdmin.java | 24 ++++++++++--------- .../src/test/resources/testHDFSConf.xml | 20 ++++++++++++++++ 2 files changed, 33 insertions(+), 11 deletions(-) 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 a43187f6399..4b624a59bdb 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 @@ -212,17 +212,19 @@ private static class ClearSpaceQuotaCommand extends DFSAdminCommand { private static final String NAME = "clrSpaceQuota"; private static final String USAGE = "-"+NAME+" [-storageType ] ..."; private static final String DESCRIPTION = USAGE + ": " + - "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" + - "\t\tIt does not fault if the directory has no quota.\n" + - "\t\tThe storage type specific quota is cleared when -storageType option is specified." + - "\t\tAvailable storageTypes are \n" + - "\t\t- RAM_DISK\n" + - "\t\t- DISK\n" + - "\t\t- SSD\n" + - "\t\t- ARCHIVE"; + "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" + + "\t\tIt does not fault if the directory has no quota.\n" + + "\t\tThe storage type specific quota is cleared when -storageType " + + "option is specified.\n" + + "\t\tAvailable storageTypes are \n" + + "\t\t- RAM_DISK\n" + + "\t\t- DISK\n" + + "\t\t- SSD\n" + + "\t\t- ARCHIVE"; private StorageType type; 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 268464f7639..d1a66df8d6d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml @@ -15979,6 +15979,26 @@ RegexpComparator ^( |\t)*The storage type specific quota is cleared when -storageType option is specified.( )* + + RegexpComparator + ^( |\t)*Available storageTypes are( )* + + + RegexpComparator + ^( |\t)*- RAM_DISK( )* + + + RegexpComparator + ^( |\t)*- DISK( )* + + + RegexpComparator + ^( |\t)*- SSD( )* + + + RegexpComparator + ^( |\t)*- ARCHIVE( )* +