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

FSNamesystem methods should call resolvePath

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.6.0
    • namenode
    • None
    • Reviewed

    Description

      The following methods in FSNamesystem don't call FSDirectory#resolvePath, but they should. The impact of this is that the APIs do not work properly for input paths of the form /.reserved/.inodes/<inode ID>.

      • getAclStatus
      • getXAttrs
      • isFileClosed
      • listXAttrs

      Attachments

        1. HDFS-6749.001.patch
          2 kB
          Charles Lamb
        2. HDFS-6749.002.patch
          4 kB
          Charles Lamb

        Activity

          cnauroth Chris Nauroth added a comment -

          It looks to me like getAclStatus has the same problem, and maybe concat also?

          cnauroth Chris Nauroth added a comment - It looks to me like getAclStatus has the same problem, and maybe concat also?
          clamb Charles Lamb added a comment -

          concat's comments say that it does not support /.reserved/.inodes so I think that omission is by design. However, isFileClosed looks like it too needs appropriate calls to resolvePath.

          clamb Charles Lamb added a comment - concat's comments say that it does not support /.reserved/.inodes so I think that omission is by design. However, isFileClosed looks like it too needs appropriate calls to resolvePath.
          cnauroth Chris Nauroth added a comment -

          Sounds good. Thanks, Charles.

          cnauroth Chris Nauroth added a comment - Sounds good. Thanks, Charles.
          clamb Charles Lamb added a comment -

          It looks like 4 places total: getXAttrs, listXAttrs, isFileClosed, getAclStatus. None of the snapshots methods call resolveHost, which I suspect is by design.

          Diffs against branch-2 attached.

          clamb Charles Lamb added a comment - It looks like 4 places total: getXAttrs, listXAttrs, isFileClosed, getAclStatus. None of the snapshots methods call resolveHost, which I suspect is by design. Diffs against branch-2 attached.
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12657680/HDFS-6749.001.patch
          against trunk revision .

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

          -1 tests included. The patch doesn't appear to include any new or modified tests.
          Please justify why no new tests are needed for this patch.
          Also please list what manual steps were performed to verify this patch.

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

          +1 javadoc. There were no new javadoc warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

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

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

          -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

          org.apache.hadoop.hdfs.server.namenode.ha.TestPipelinesFailover

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

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/7458//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7458//console

          This message is automatically generated.

          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12657680/HDFS-6749.001.patch against trunk revision . +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 core tests . The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.server.namenode.ha.TestPipelinesFailover +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/7458//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7458//console This message is automatically generated.
          cnauroth Chris Nauroth added a comment -

          The patch looks good. I suppose the way to test this would be to call these APIs using /.reserved/.inodes/<inode ID> as the input path. I'd expect the tests to fail before your patch, but pass after your patch.

          cnauroth Chris Nauroth added a comment - The patch looks good. I suppose the way to test this would be to call these APIs using /.reserved/.inodes/<inode ID> as the input path. I'd expect the tests to fail before your patch, but pass after your patch.
          clamb Charles Lamb added a comment -

          cnauroth,

          Thanks for the review and that's a good point about adding a unit test. I've added calls to these methods in TestINodeFile and confirmed that each of them fails without the patch and passes with the patch.

          clamb Charles Lamb added a comment - cnauroth , Thanks for the review and that's a good point about adding a unit test. I've added calls to these methods in TestINodeFile and confirmed that each of them fails without the patch and passes with the patch.
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12657840/HDFS-6749.002.patch
          against trunk revision .

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

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

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

          +1 javadoc. There were no new javadoc warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

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

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

          -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

          org.apache.hadoop.hdfs.server.namenode.ha.TestDFSUpgradeWithHA

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

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/7465//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7465//console

          This message is automatically generated.

          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12657840/HDFS-6749.002.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 core tests . The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.server.namenode.ha.TestDFSUpgradeWithHA +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/7465//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7465//console This message is automatically generated.
          clamb Charles Lamb added a comment -

          The test failure appears to be unrelated.

          clamb Charles Lamb added a comment - The test failure appears to be unrelated.
          cnauroth Chris Nauroth added a comment -

          +1 for the patch. I'll commit this.

          cnauroth Chris Nauroth added a comment - +1 for the patch. I'll commit this.
          cnauroth Chris Nauroth added a comment -

          I committed this to trunk and branch-2. Charles, thank you for reporting the bug and providing the patch.

          cnauroth Chris Nauroth added a comment - I committed this to trunk and branch-2. Charles, thank you for reporting the bug and providing the patch.
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #5976 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5976/)
          HDFS-6749. FSNamesystem methods should call resolvePath. Contributed by Charles Lamb. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1613561)

          • /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/server/namenode/FSNamesystem.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #5976 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5976/ ) HDFS-6749 . FSNamesystem methods should call resolvePath. Contributed by Charles Lamb. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1613561 ) /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/server/namenode/FSNamesystem.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #624 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/624/)
          HDFS-6749. FSNamesystem methods should call resolvePath. Contributed by Charles Lamb. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1613561)

          • /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/server/namenode/FSNamesystem.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #624 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/624/ ) HDFS-6749 . FSNamesystem methods should call resolvePath. Contributed by Charles Lamb. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1613561 ) /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/server/namenode/FSNamesystem.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #1816 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1816/)
          HDFS-6749. FSNamesystem methods should call resolvePath. Contributed by Charles Lamb. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1613561)

          • /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/server/namenode/FSNamesystem.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #1816 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1816/ ) HDFS-6749 . FSNamesystem methods should call resolvePath. Contributed by Charles Lamb. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1613561 ) /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/server/namenode/FSNamesystem.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Mapreduce-trunk #1843 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1843/)
          HDFS-6749. FSNamesystem methods should call resolvePath. Contributed by Charles Lamb. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1613561)

          • /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/server/namenode/FSNamesystem.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #1843 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1843/ ) HDFS-6749 . FSNamesystem methods should call resolvePath. Contributed by Charles Lamb. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1613561 ) /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/server/namenode/FSNamesystem.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java

          People

            clamb Charles Lamb
            clamb Charles Lamb
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: