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

DistributedFileSystem#getTrashRoot returns incorrect path for encryption zones

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      getTrashRoots is missing a "/" in the path concatenation, so ends up putting files into a directory named "/ez/.Trashandrew" rather than "/ez/.Trash/andrew"

      1. HDFS-9881.001.patch
        2 kB
        Andrew Wang
      2. HDFS-9881.002.patch
        2 kB
        Andrew Wang

        Activity

        Hide
        andrew.wang Andrew Wang added a comment -

        Thanks to Harsh J for the spot. Zhe Zhang / Xiaoyu Yao / Colin P. McCabe mind reviewing?

        Show
        andrew.wang Andrew Wang added a comment - Thanks to Harsh J for the spot. Zhe Zhang / Xiaoyu Yao / Colin P. McCabe mind reviewing?
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s Docker mode activated.
        -1 patch 0m 4s HDFS-9881 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.



        Subsystem Report/Notes
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12790786/HDFS-9881.001.patch
        JIRA Issue HDFS-9881
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14675/console
        Powered by Apache Yetus 0.3.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 0s Docker mode activated. -1 patch 0m 4s HDFS-9881 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help. Subsystem Report/Notes JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12790786/HDFS-9881.001.patch JIRA Issue HDFS-9881 Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14675/console Powered by Apache Yetus 0.3.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        zhz Zhe Zhang added a comment -

        Hi Andrew, I thought the issue was already fixed by HDFS-9844?

        Show
        zhz Zhe Zhang added a comment - Hi Andrew, I thought the issue was already fixed by HDFS-9844 ?
        Hide
        andrew.wang Andrew Wang added a comment -

        We still missed adding a / after TRASH_PREFIX, HDFS-9844 fixes the issue with "/" as EZ though.

        We should avoid using string concatenation for paths in general, it leads to issues like this.

        Show
        andrew.wang Andrew Wang added a comment - We still missed adding a / after TRASH_PREFIX, HDFS-9844 fixes the issue with "/" as EZ though. We should avoid using string concatenation for paths in general, it leads to issues like this.
        Hide
        andrew.wang Andrew Wang added a comment -

        Rebased

        Show
        andrew.wang Andrew Wang added a comment - Rebased
        Hide
        zhz Zhe Zhang added a comment -

        Thanks Andrew. +1 on the patch pending Jenkins.

        Show
        zhz Zhe Zhang added a comment - Thanks Andrew. +1 on the patch pending Jenkins.
        Hide
        xyao Xiaoyu Yao added a comment -

        Thanks Andrew Wang. Patch LGTM, +1.

        Show
        xyao Xiaoyu Yao added a comment - Thanks Andrew Wang . Patch LGTM, +1.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 11s 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.
        0 mvndep 0m 10s Maven dependency ordering for branch
        +1 mvninstall 6m 43s trunk passed
        +1 compile 1m 12s trunk passed with JDK v1.8.0_72
        +1 compile 1m 20s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 25s trunk passed
        +1 mvnsite 1m 24s trunk passed
        +1 mvneclipse 0m 27s trunk passed
        +1 findbugs 3m 41s trunk passed
        +1 javadoc 1m 29s trunk passed with JDK v1.8.0_72
        +1 javadoc 2m 11s trunk passed with JDK v1.7.0_95
        0 mvndep 0m 9s Maven dependency ordering for patch
        +1 mvninstall 1m 17s the patch passed
        +1 compile 1m 13s the patch passed with JDK v1.8.0_72
        +1 javac 1m 13s the patch passed
        +1 compile 1m 19s the patch passed with JDK v1.7.0_95
        +1 javac 1m 19s the patch passed
        +1 checkstyle 0m 24s the patch passed
        +1 mvnsite 1m 22s the patch passed
        +1 mvneclipse 0m 22s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 4m 3s the patch passed
        +1 javadoc 1m 20s the patch passed with JDK v1.8.0_72
        +1 javadoc 2m 7s the patch passed with JDK v1.7.0_95
        +1 unit 0m 48s hadoop-hdfs-client in the patch passed with JDK v1.8.0_72.
        +1 unit 54m 49s hadoop-hdfs in the patch passed with JDK v1.8.0_72.
        +1 unit 0m 58s hadoop-hdfs-client in the patch passed with JDK v1.7.0_95.
        -1 unit 52m 20s hadoop-hdfs in the patch failed with JDK v1.7.0_95.
        +1 asflicense 0m 26s Patch does not generate ASF License warnings.
        144m 27s



        Reason Tests
        JDK v1.7.0_95 Failed junit tests hadoop.hdfs.TestRollingUpgradeRollback



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12790791/HDFS-9881.002.patch
        JIRA Issue HDFS-9881
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux e4ce7c31dc4a 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
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / f98dff3
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_72 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14678/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt
        unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14678/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14678/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14678/console
        Powered by Apache Yetus 0.3.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 11s 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. 0 mvndep 0m 10s Maven dependency ordering for branch +1 mvninstall 6m 43s trunk passed +1 compile 1m 12s trunk passed with JDK v1.8.0_72 +1 compile 1m 20s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 25s trunk passed +1 mvnsite 1m 24s trunk passed +1 mvneclipse 0m 27s trunk passed +1 findbugs 3m 41s trunk passed +1 javadoc 1m 29s trunk passed with JDK v1.8.0_72 +1 javadoc 2m 11s trunk passed with JDK v1.7.0_95 0 mvndep 0m 9s Maven dependency ordering for patch +1 mvninstall 1m 17s the patch passed +1 compile 1m 13s the patch passed with JDK v1.8.0_72 +1 javac 1m 13s the patch passed +1 compile 1m 19s the patch passed with JDK v1.7.0_95 +1 javac 1m 19s the patch passed +1 checkstyle 0m 24s the patch passed +1 mvnsite 1m 22s the patch passed +1 mvneclipse 0m 22s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 4m 3s the patch passed +1 javadoc 1m 20s the patch passed with JDK v1.8.0_72 +1 javadoc 2m 7s the patch passed with JDK v1.7.0_95 +1 unit 0m 48s hadoop-hdfs-client in the patch passed with JDK v1.8.0_72. +1 unit 54m 49s hadoop-hdfs in the patch passed with JDK v1.8.0_72. +1 unit 0m 58s hadoop-hdfs-client in the patch passed with JDK v1.7.0_95. -1 unit 52m 20s hadoop-hdfs in the patch failed with JDK v1.7.0_95. +1 asflicense 0m 26s Patch does not generate ASF License warnings. 144m 27s Reason Tests JDK v1.7.0_95 Failed junit tests hadoop.hdfs.TestRollingUpgradeRollback Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12790791/HDFS-9881.002.patch JIRA Issue HDFS-9881 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux e4ce7c31dc4a 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 Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / f98dff3 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_72 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/14678/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14678/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14678/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14678/console Powered by Apache Yetus 0.3.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        andrew.wang Andrew Wang added a comment -

        Jenkins failed with a port in use exception, so I'm going to go ahead and commit based on xyao's +1. Thanks all!

        Show
        andrew.wang Andrew Wang added a comment - Jenkins failed with a port in use exception, so I'm going to go ahead and commit based on xyao's +1. Thanks all!
        Hide
        andrew.wang Andrew Wang added a comment -

        Pushed to trunk, branch-2, branch-2.8. Thanks again Xiaoyu and Zhe for taking a look!

        Show
        andrew.wang Andrew Wang added a comment - Pushed to trunk, branch-2, branch-2.8. Thanks again Xiaoyu and Zhe for taking a look!
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #9407 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9407/)
        HDFS-9881. DistributedFileSystem#getTrashRoot returns incorrect path for (wang: rev 4abb2fa687a80d2b76f2751dd31513822601b235)

        • hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestEncryptionZones.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9407 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9407/ ) HDFS-9881 . DistributedFileSystem#getTrashRoot returns incorrect path for (wang: rev 4abb2fa687a80d2b76f2751dd31513822601b235) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestEncryptionZones.java

          People

          • Assignee:
            andrew.wang Andrew Wang
            Reporter:
            andrew.wang Andrew Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development