Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8711

setSpaceQuota command should print the available storage type when input storage type is wrong

    Details

    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      If input storage type is wrong then currently setSpaceQuota give exception like this.

      ./hdfs dfsadmin -setSpaceQuota 10000000 -storageType COLD /testDir
       setSpaceQuota: No enum constant org.apache.hadoop.fs.StorageType.COLD
      

      It should be

      setSpaceQuota: Storage type COLD not available. Available storage type are [SSD, DISK, ARCHIVE]
      
      1. HDFS-8711-01.patch
        4 kB
        Surendra Singh Lilhore
      2. HDFS-8711.patch
        1 kB
        Surendra Singh Lilhore

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #238 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/238/)
          HDFS-8711. setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #238 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/238/ ) HDFS-8711 . setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2177 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2177/)
          HDFS-8711. setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2177 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2177/ ) HDFS-8711 . setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2196 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2196/)
          HDFS-8711. setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2196 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2196/ ) HDFS-8711 . setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #248 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/248/)
          HDFS-8711. setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #248 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/248/ ) HDFS-8711 . setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
          Hide
          vinayrpet Vinayakumar B added a comment -

          Cherry picked this to branch-2 as well. To keep the diff between trunk and branch-2 minimal.

          Show
          vinayrpet Vinayakumar B added a comment - Cherry picked this to branch-2 as well. To keep the diff between trunk and branch-2 minimal.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #980 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/980/)
          HDFS-8711. setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #980 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/980/ ) HDFS-8711 . setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #250 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/250/)
          HDFS-8711. setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #250 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/250/ ) HDFS-8711 . setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #8128 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8128/)
          HDFS-8711. setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8128 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8128/ ) HDFS-8711 . setSpaceQuota command should print the available storage type when input storage type is wrong. Contributed by Brahma Reddy Battula. (xyao: rev b68701b7b2a9597b4183e0ba19b1551680d543a1) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          xyao Xiaoyu Yao added a comment -

          Thanks Surendra Singh Lilhore for the contribution! I've committed the patch to trunk.

          Show
          xyao Xiaoyu Yao added a comment - Thanks Surendra Singh Lilhore for the contribution! I've committed the patch to trunk.
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          -1 pre-patch 21m 12s Pre-patch trunk has 1 extant Findbugs (version 3.0.0) warnings.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
          +1 javac 8m 30s There were no new javac warning messages.
          +1 javadoc 11m 42s There were no new javadoc warning messages.
          +1 release audit 0m 28s The applied patch does not increase the total number of release audit warnings.
          -1 checkstyle 3m 0s The applied patch generated 1 new checkstyle issues (total was 228, now 228).
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
          +1 install 2m 23s mvn install still works.
          +1 eclipse:eclipse 0m 42s The patch built with eclipse:eclipse.
          +1 findbugs 4m 50s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 native 4m 25s Pre-build of native portion
          -1 hdfs tests 84m 51s Tests failed in hadoop-hdfs.
              142m 6s  



          Reason Tests
          Timed out tests org.apache.hadoop.hdfs.server.datanode.TestRefreshNamenodes



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12743457/HDFS-8711-01.patch
          Optional Tests javadoc javac unit findbugs checkstyle
          git revision trunk / 2eae130
          Pre-patch Findbugs warnings https://builds.apache.org/job/PreCommit-HDFS-Build/11570/artifact/patchprocess/trunkFindbugsWarningshadoop-hdfs.html
          checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/11570/artifact/patchprocess/diffcheckstylehadoop-hdfs.txt
          hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11570/artifact/patchprocess/testrun_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11570/testReport/
          Java 1.7.0_55
          uname Linux asf904.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11570/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment -1 pre-patch 21m 12s Pre-patch trunk has 1 extant Findbugs (version 3.0.0) warnings. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 8m 30s There were no new javac warning messages. +1 javadoc 11m 42s There were no new javadoc warning messages. +1 release audit 0m 28s The applied patch does not increase the total number of release audit warnings. -1 checkstyle 3m 0s The applied patch generated 1 new checkstyle issues (total was 228, now 228). +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 2m 23s mvn install still works. +1 eclipse:eclipse 0m 42s The patch built with eclipse:eclipse. +1 findbugs 4m 50s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 native 4m 25s Pre-build of native portion -1 hdfs tests 84m 51s Tests failed in hadoop-hdfs.     142m 6s   Reason Tests Timed out tests org.apache.hadoop.hdfs.server.datanode.TestRefreshNamenodes Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12743457/HDFS-8711-01.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 2eae130 Pre-patch Findbugs warnings https://builds.apache.org/job/PreCommit-HDFS-Build/11570/artifact/patchprocess/trunkFindbugsWarningshadoop-hdfs.html checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/11570/artifact/patchprocess/diffcheckstylehadoop-hdfs.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11570/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11570/testReport/ Java 1.7.0_55 uname Linux asf904.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11570/console This message was automatically generated.
          Hide
          surendrasingh Surendra Singh Lilhore added a comment -

          Thanks Xiaoyu Yao for reviewing.
          Attached new patch with unit test , Please review ...

          Show
          surendrasingh Surendra Singh Lilhore added a comment - Thanks Xiaoyu Yao for reviewing. Attached new patch with unit test , Please review ...
          Hide
          xyao Xiaoyu Yao added a comment -

          Patch LGTM. A few comments:
          1. "Available storage type are " should be "Available storage types are"
          2. Can you add a unit test for the change?

          Show
          xyao Xiaoyu Yao added a comment - Patch LGTM. A few comments: 1. "Available storage type are " should be "Available storage types are" 2. Can you add a unit test for the change?
          Hide
          surendrasingh Surendra Singh Lilhore added a comment -

          Attached patch, Please review...

          Show
          surendrasingh Surendra Singh Lilhore added a comment - Attached patch, Please review...

            People

            • Assignee:
              surendrasingh Surendra Singh Lilhore
              Reporter:
              surendrasingh Surendra Singh Lilhore
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development