hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1349639 - in /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java src/test/resources/testHDFSConf.xml
Date Wed, 13 Jun 2012 05:29:57 GMT
Author: atm
Date: Wed Jun 13 05:29:57 2012
New Revision: 1349639

URL: http://svn.apache.org/viewvc?rev=1349639&view=rev
Log:
HDFS-766. Error message not clear for set space quota out of boundary values. Contributed
by Jon Zuanich.

Modified:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1349639&r1=1349638&r2=1349639&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Wed Jun 13 05:29:57 2012
@@ -336,6 +336,9 @@ Branch-2 ( Unreleased changes )
     HDFS-3531. EditLogFileOutputStream#preallocate should check for
     incomplete writes. (Colin Patrick McCabe via eli)
 
+    HDFS-766. Error message not clear for set space quota out of boundary
+    values. (Jon Zuanich via atm)
+
   BREAKDOWN OF HDFS-3042 SUBTASKS
 
     HDFS-2185. HDFS portion of ZK-based FailoverController (todd)

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java?rev=1349639&r1=1349638&r2=1349639&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
Wed Jun 13 05:29:57 2012
@@ -239,7 +239,12 @@ public class DFSAdmin extends FsShell {
       CommandFormat c = new CommandFormat(2, Integer.MAX_VALUE);
       List<String> parameters = c.parse(args, pos);
       String str = parameters.remove(0).trim();
-      quota = StringUtils.TraditionalBinaryPrefix.string2long(str);
+      try {
+        quota = StringUtils.TraditionalBinaryPrefix.string2long(str);
+      } catch (NumberFormatException nfe) {
+        throw new IllegalArgumentException("\"" + str + "\" is not a valid value for a quota.");
+      }
+      
       this.args = parameters.toArray(new String[parameters.size()]);
     }
     

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml?rev=1349639&r1=1349638&r2=1349639&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
Wed Jun 13 05:29:57 2012
@@ -15470,7 +15470,7 @@
       <comparators>
         <comparator>
           <type>SubstringComparator</type>
-          <expected-output>For input string: "a5"</expected-output>
+          <expected-output>setSpaceQuota: "a5" is not a valid value for a quota.</expected-output>
         </comparator>
       </comparators>
     </test>



Mime
View raw message