Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-1723

quota errors messages should use the same scale

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.21.0
    • Fix Version/s: 0.23.0
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Updated the Quota exceptions to now use human readable output.

      Description

      A typical error message looks like this:

      org.apache.hadoop.hdfs.protocol.DSQuotaExceededException: org.apache.hadoop.hdfs.protocol.DSQuotaExceededException: The DiskSpace quota of /dir is exceeded: quota=3298534883328 diskspace consumed=5246.0g

      Since the two values are in difference scales and one is replicated vs. not replicated (I think), this isn't very easy for the user to understand.

      1. HDFS-1723-take1.txt
        3 kB
        Jim Plush
      2. HDFS-1723-take2.txt
        4 kB
        Jim Plush
      3. HDFS-1723-take3.txt
        3 kB
        Jim Plush
      4. HDFS-1723-take4.txt
        3 kB
        Jim Plush

        Activity

        Allen Wittenauer created issue -
        Aaron T. Myers made changes -
        Field Original Value New Value
        Labels newbie
        Jim Plush made changes -
        Assignee Jim Plush [ jimplush ]
        Hide
        Jim Plush added a comment -

        Updated NSQuotaExceededException and DSQuotaExceededException to use human readable output values. Also added a new test to the TestQuota.java file to test for the new human readable values.

        Show
        Jim Plush added a comment - Updated NSQuotaExceededException and DSQuotaExceededException to use human readable output values. Also added a new test to the TestQuota.java file to test for the new human readable values.
        Jim Plush made changes -
        Attachment HDFS-1723-take1.txt [ 12483799 ]
        Jim Plush made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Release Note Updated the Quota exceptions to now use human readable output.
        Affects Version/s 0.21.0 [ 12314046 ]
        Fix Version/s 0.23.0 [ 12315571 ]
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12483799/HDFS-1723-take1.txt
        against trunk revision 1139473.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these core unit tests:
        org.apache.hadoop.cli.TestHDFSCLI

        +1 contrib tests. The patch passed contrib unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/839//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/839//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/839//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12483799/HDFS-1723-take1.txt against trunk revision 1139473. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these core unit tests: org.apache.hadoop.cli.TestHDFSCLI +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/839//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/839//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/839//console This message is automatically generated.
        Hide
        Jim Plush added a comment -

        looks like there was a hard coded check in the testHDFSConf.xml file that looked for the actual integer for quota. I updated this xml file to look for the human readable numbers instead. The test was also updated to account for having a path in the error message.

        Show
        Jim Plush added a comment - looks like there was a hard coded check in the testHDFSConf.xml file that looked for the actual integer for quota. I updated this xml file to look for the human readable numbers instead. The test was also updated to account for having a path in the error message.
        Jim Plush made changes -
        Attachment HDFS-1723-take2.txt [ 12483805 ]
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12483805/HDFS-1723-take2.txt
        against trunk revision 1139473.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 9 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/840//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/840//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/840//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12483805/HDFS-1723-take2.txt against trunk revision 1139473. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 9 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/840//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/840//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/840//console This message is automatically generated.
        Hide
        Aaron T. Myers added a comment -

        Hey Jim, the patch looks pretty good. Only thing is that I don't think you should have changed the output for namespace quotas as well. The namespace quota is a count of files/directories under the relevant path, so it doesn't make much sense to represent those values in k/m/g.

        Show
        Aaron T. Myers added a comment - Hey Jim, the patch looks pretty good. Only thing is that I don't think you should have changed the output for namespace quotas as well. The namespace quota is a count of files/directories under the relevant path, so it doesn't make much sense to represent those values in k/m/g.
        Hide
        Jim Plush added a comment -

        good catch, I'll update the patch and re-submit

        Show
        Jim Plush added a comment - good catch, I'll update the patch and re-submit
        Hide
        Jim Plush added a comment -

        refactoring based on Aaron's comments regarding removing the NSQuotaExceededException from the patch as it's not required for the fix.

        Show
        Jim Plush added a comment - refactoring based on Aaron's comments regarding removing the NSQuotaExceededException from the patch as it's not required for the fix.
        Jim Plush made changes -
        Attachment HDFS-1723-take3.txt [ 12483868 ]
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12483868/HDFS-1723-take3.txt
        against trunk revision 1139715.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 7 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/842//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/842//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/842//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12483868/HDFS-1723-take3.txt against trunk revision 1139715. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 7 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/842//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/842//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/842//console This message is automatically generated.
        Hide
        Aaron T. Myers added a comment -

        Thanks for addressing my comments, Jim. I should have noticed this earlier, but I have one final comment and then I'll give it a +1 / commit it:

        Earlier in the test we're explicitly setting the quota value to 1k, so we might as well explicitly test that the output is 1.0k, rather than have a regex which will match it. We wouldn't want this test to pass if it output, for example, "quota=9.5k"

        Show
        Aaron T. Myers added a comment - Thanks for addressing my comments, Jim. I should have noticed this earlier, but I have one final comment and then I'll give it a +1 / commit it: Earlier in the test we're explicitly setting the quota value to 1k, so we might as well explicitly test that the output is 1.0k, rather than have a regex which will match it. We wouldn't want this test to pass if it output, for example, "quota=9.5k"
        Hide
        Jim Plush added a comment -

        adding explicit check for the quota equaling 1.0k

        Show
        Jim Plush added a comment - adding explicit check for the quota equaling 1.0k
        Jim Plush made changes -
        Attachment HDFS-1723-take4.txt [ 12483898 ]
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12483898/HDFS-1723-take4.txt
        against trunk revision 1139715.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 7 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/846//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/846//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/846//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12483898/HDFS-1723-take4.txt against trunk revision 1139715. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 7 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/846//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/846//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/846//console This message is automatically generated.
        Hide
        Aaron T. Myers added a comment -

        I've just committed this.

        Thanks a lot for the contribution, Jim!

        Show
        Aaron T. Myers added a comment - I've just committed this. Thanks a lot for the contribution, Jim!
        Aaron T. Myers made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Incompatible change, Reviewed]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #761 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/761/)
        HDFS-1723. quota errors messages should use the same scale. (Jim Plush via atm)

        atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1140030
        Files :

        • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml
        • /hadoop/common/trunk/hdfs/CHANGES.txt
        • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestQuota.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/protocol/DSQuotaExceededException.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #761 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/761/ ) HDFS-1723 . quota errors messages should use the same scale. (Jim Plush via atm) atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1140030 Files : /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestQuota.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/protocol/DSQuotaExceededException.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #708 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/708/)
        HDFS-1723. quota errors messages should use the same scale. (Jim Plush via atm)

        atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1140030
        Files :

        • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml
        • /hadoop/common/trunk/hdfs/CHANGES.txt
        • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestQuota.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/protocol/DSQuotaExceededException.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #708 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/708/ ) HDFS-1723 . quota errors messages should use the same scale. (Jim Plush via atm) atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1140030 Files : /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestQuota.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/protocol/DSQuotaExceededException.java
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Jim Plush
            Reporter:
            Allen Wittenauer
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development