From 414fbfab41470923eb82a21628709e51fd3a3f6e 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. --- .../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 73762c68f8f..ba09e8bc8e8 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 @@ -211,17 +211,19 @@ public class DFSAdmin extends FsShell { 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 627f0e92fb0..88518bfe6e4 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( )* +