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

'storagepolicies -getStoragePolicy' command should accept URI based path.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.1
    • Fix Version/s: 2.9.0, 3.0.0-alpha4, 2.8.2
    • Component/s: shell
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      hdfs storagepolicies -getStoragePolicy -path hdfs://127.0.0.1:8020/t1
      RemoteException: Invalid path name Invalid file name: hdfs://127.0.0.1:8020/t1
      
      1. HDFS-11177.003.patch
        7 kB
        Surendra Singh Lilhore
      2. HDFS-11177.002.patch
        6 kB
        Surendra Singh Lilhore
      3. HDFS-11177.001.patch
        4 kB
        Surendra Singh Lilhore

        Activity

        Hide
        vinodkv Vinod Kumar Vavilapalli added a comment -

        2.8.1 became a security release. Moving fix-version to 2.8.2 after the fact.

        Show
        vinodkv Vinod Kumar Vavilapalli added a comment - 2.8.1 became a security release. Moving fix-version to 2.8.2 after the fact.
        Hide
        surendrasingh Surendra Singh Lilhore added a comment -

        Thanks Vinayakumar B for review and commit..

        Show
        surendrasingh Surendra Singh Lilhore added a comment - Thanks Vinayakumar B for review and commit..
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11281 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11281/)
        HDFS-11177. 'storagepolicies -getStoragePolicy' command should accept (vinayakumarb: rev 480405063063f564ae0cdb34e0757ac3990569aa)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestStoragePolicyCommands.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/StoragePolicyAdmin.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/AdminHelper.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11281 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11281/ ) HDFS-11177 . 'storagepolicies -getStoragePolicy' command should accept (vinayakumarb: rev 480405063063f564ae0cdb34e0757ac3990569aa) (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestStoragePolicyCommands.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/StoragePolicyAdmin.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/AdminHelper.java
        Hide
        vinayrpet Vinayakumar B added a comment -

        Thank you Surendra Singh Lilhore for the contribution.

        Show
        vinayrpet Vinayakumar B added a comment - Thank you Surendra Singh Lilhore for the contribution.
        Hide
        vinayrpet Vinayakumar B added a comment -

        Committed to trunk, branch-2 and branch-2.8

        Show
        vinayrpet Vinayakumar B added a comment - Committed to trunk, branch-2 and branch-2.8
        Hide
        vinayrpet Vinayakumar B added a comment -

        +1 for latest patch.

        Show
        vinayrpet Vinayakumar B added a comment - +1 for latest patch.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 17s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 14m 27s trunk passed
        +1 compile 0m 47s trunk passed
        +1 checkstyle 0m 36s trunk passed
        +1 mvnsite 0m 56s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 49s trunk passed
        +1 javadoc 0m 40s trunk passed
        +1 mvninstall 0m 47s the patch passed
        +1 compile 0m 44s the patch passed
        +1 javac 0m 44s the patch passed
        +1 checkstyle 0m 33s the patch passed
        +1 mvnsite 0m 52s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 57s the patch passed
        +1 javadoc 0m 37s the patch passed
        -1 unit 112m 5s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 26s The patch does not generate ASF License warnings.
        139m 11s



        Reason Tests
        Failed junit tests hadoop.hdfs.TestReadStripedFileWithMissingBlocks
          hadoop.hdfs.TestPersistBlocks
          hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure
          hadoop.hdfs.server.blockmanagement.TestReconstructStripedBlocksWithRackAwareness
          hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HDFS-11177
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12853264/HDFS-11177.003.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux fcb91c8edf10 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 02c5494
        Default Java 1.8.0_121
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/18396/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/18396/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/18396/console
        Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 17s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 14m 27s trunk passed +1 compile 0m 47s trunk passed +1 checkstyle 0m 36s trunk passed +1 mvnsite 0m 56s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 49s trunk passed +1 javadoc 0m 40s trunk passed +1 mvninstall 0m 47s the patch passed +1 compile 0m 44s the patch passed +1 javac 0m 44s the patch passed +1 checkstyle 0m 33s the patch passed +1 mvnsite 0m 52s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 57s the patch passed +1 javadoc 0m 37s the patch passed -1 unit 112m 5s hadoop-hdfs in the patch failed. +1 asflicense 0m 26s The patch does not generate ASF License warnings. 139m 11s Reason Tests Failed junit tests hadoop.hdfs.TestReadStripedFileWithMissingBlocks   hadoop.hdfs.TestPersistBlocks   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure   hadoop.hdfs.server.blockmanagement.TestReconstructStripedBlocksWithRackAwareness   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HDFS-11177 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12853264/HDFS-11177.003.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux fcb91c8edf10 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 02c5494 Default Java 1.8.0_121 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/18396/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/18396/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/18396/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        surendrasingh Surendra Singh Lilhore added a comment -

        Thanks Vinayakumar B for review..

        2. Instead of directly replacing the current assertions with fully qualified path, better to add separate assertions with full qualified path. Let current assertions be as is.

        I feel this is not required. We have three statement for verifing setStoragePolicy. I change only one statement for fully qualified path, other two statement still using path without schema.

        Attached v3 patch and fixed other review comment.

        Please review..

        Show
        surendrasingh Surendra Singh Lilhore added a comment - Thanks Vinayakumar B for review.. 2. Instead of directly replacing the current assertions with fully qualified path, better to add separate assertions with full qualified path. Let current assertions be as is. I feel this is not required. We have three statement for verifing setStoragePolicy . I change only one statement for fully qualified path, other two statement still using path without schema. Attached v3 patch and fixed other review comment. Please review..
        Hide
        vinayrpet Vinayakumar B added a comment -

        Thanks for the patch Surendra Singh Lilhore.
        Patch mostly looks good to me. Some nits to update.

        1. Variable name can be something different than path2. it can be just p.

        Path path2 = new Path(path);

        2. Instead of directly replacing the current assertions with fully qualified path, better to add separate assertions with full qualified path. Let current assertions be as is.

        -    DFSTestUtil.toolRun(admin, "-setStoragePolicy -path /foo -policy WARM", 0,
        -        "Set storage policy WARM on " + foo.toString());
        +    DFSTestUtil.toolRun(admin, "-setStoragePolicy -path " + fs.getUri()
        +        + "/foo -policy WARM", 0, "Set storage policy WARM on " + fs.getUri()
        +        + "/foo");
        Show
        vinayrpet Vinayakumar B added a comment - Thanks for the patch Surendra Singh Lilhore . Patch mostly looks good to me. Some nits to update. 1. Variable name can be something different than path2 . it can be just p . Path path2 = new Path(path); 2. Instead of directly replacing the current assertions with fully qualified path, better to add separate assertions with full qualified path. Let current assertions be as is. - DFSTestUtil.toolRun(admin, "-setStoragePolicy -path /foo -policy WARM" , 0, - "Set storage policy WARM on " + foo.toString()); + DFSTestUtil.toolRun(admin, "-setStoragePolicy -path " + fs.getUri() + + "/foo -policy WARM" , 0, "Set storage policy WARM on " + fs.getUri() + + "/foo" );
        Hide
        surendrasingh Surendra Singh Lilhore added a comment -

        Attached new patch..
        Please review...

        Show
        surendrasingh Surendra Singh Lilhore added a comment - Attached new patch.. Please review...
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 18s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 7m 6s trunk passed
        +1 compile 0m 45s trunk passed
        +1 checkstyle 0m 26s trunk passed
        +1 mvnsite 0m 51s trunk passed
        +1 mvneclipse 0m 14s trunk passed
        +1 findbugs 1m 40s trunk passed
        +1 javadoc 0m 40s trunk passed
        +1 mvninstall 0m 46s the patch passed
        +1 compile 0m 43s the patch passed
        +1 javac 0m 43s the patch passed
        +1 checkstyle 0m 24s the patch passed
        +1 mvnsite 0m 52s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 47s the patch passed
        +1 javadoc 0m 40s the patch passed
        -1 unit 94m 12s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 19s The patch does not generate ASF License warnings.
        113m 15s



        Reason Tests
        Failed junit tests hadoop.hdfs.server.namenode.TestAddStripedBlockInFBR
          hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HDFS-11177
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12840569/HDFS-11177.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 7bfbc6d846d4 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 07825f2
        Default Java 1.8.0_111
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/17667/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17667/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17667/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 18s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 6s trunk passed +1 compile 0m 45s trunk passed +1 checkstyle 0m 26s trunk passed +1 mvnsite 0m 51s trunk passed +1 mvneclipse 0m 14s trunk passed +1 findbugs 1m 40s trunk passed +1 javadoc 0m 40s trunk passed +1 mvninstall 0m 46s the patch passed +1 compile 0m 43s the patch passed +1 javac 0m 43s the patch passed +1 checkstyle 0m 24s the patch passed +1 mvnsite 0m 52s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 47s the patch passed +1 javadoc 0m 40s the patch passed -1 unit 94m 12s hadoop-hdfs in the patch failed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 113m 15s Reason Tests Failed junit tests hadoop.hdfs.server.namenode.TestAddStripedBlockInFBR   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HDFS-11177 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12840569/HDFS-11177.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 7bfbc6d846d4 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 07825f2 Default Java 1.8.0_111 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/17667/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17667/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17667/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        surendrasingh Surendra Singh Lilhore added a comment -

        Attached initial patch..
        Please review..

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development