Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0-beta
    • 2.1.0-beta
    • namenode
    • None
    • Reviewed

    Description

      NN can get NPE when resolving an inode id path for a nonexistent file.

      Attachments

        1. HDFS-4784.patch
          2 kB
          Brandon Li
        2. HDFS-4784.patch2
          3 kB
          Brandon Li
        3. HDFS-4784.patch3
          3 kB
          Brandon Li

        Activity

          brandonli Brandon Li added a comment -

          Uploaded a patch to fix the NPE along with a method name typo fix.

          brandonli Brandon Li added a comment - Uploaded a patch to fix the NPE along with a method name typo fix.
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12581292/HDFS-4784.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. The javadoc tool did not generate any warning messages.

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

          +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 unit tests in hadoop-hdfs-project/hadoop-hdfs.

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

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/4349//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/4349//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/12581292/HDFS-4784.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 . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +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 unit tests in hadoop-hdfs-project/hadoop-hdfs. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/4349//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/4349//console This message is automatically generated.

          Comments:

          1. Please add a unit test for this
          2. Also in removedAllFromInodesFromMap should be removeAllFromInodesFromMap
          sureshms Suresh Srinivas added a comment - Comments: Please add a unit test for this Also in removedAllFromInodesFromMap should be removeAllFromInodesFromMap
          daryn Daryn Sharp added a comment -

          Is this masking a bug? Why would removedAllFromInodesFromMap be called with a non-existent inode?

          daryn Daryn Sharp added a comment - Is this masking a bug? Why would removedAllFromInodesFromMap be called with a non-existent inode?
          brandonli Brandon Li added a comment -

          Daryn,
          removedAllFromInodesFromMap is just a typo fix additional to the NPE fix.

          brandonli Brandon Li added a comment - Daryn, removedAllFromInodesFromMap is just a typo fix additional to the NPE fix.
          brandonli Brandon Li added a comment -

          Uploaded new path to address Suresh's comments.
          Thanks!

          brandonli Brandon Li added a comment - Uploaded new path to address Suresh's comments. Thanks!

          Comments:

          1. Please move the added test to #testInodepath() instead of testInodeReplacement. I also think there is no need to delete an existing inode. You could just return null from the mock.
          2. nit: Could you also merge throwing exception FileNotFoundException on NumberFormatException in FSDirectory#resolvePath()?
          sureshms Suresh Srinivas added a comment - Comments: Please move the added test to #testInodepath() instead of testInodeReplacement. I also think there is no need to delete an existing inode. You could just return null from the mock. nit: Could you also merge throwing exception FileNotFoundException on NumberFormatException in FSDirectory#resolvePath()?
          hadoopqa Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12581382/HDFS-4784.patch2
          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. The javadoc tool did not generate any warning messages.

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

          +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 unit tests in hadoop-hdfs-project/hadoop-hdfs.

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

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/4354//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/4354//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/12581382/HDFS-4784.patch2 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 . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +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 unit tests in hadoop-hdfs-project/hadoop-hdfs. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/4354//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/4354//console This message is automatically generated.
          brandonli Brandon Li added a comment -

          Uploaded the new patch to address the new comments.
          Thanks!

          brandonli Brandon Li added a comment - Uploaded the new patch to address the new comments. Thanks!

          +1 for the patch.

          sureshms Suresh Srinivas added a comment - +1 for the patch.

          I committed the patch to trunk. Thank you Brandon.

          sureshms Suresh Srinivas added a comment - I committed the patch to trunk. Thank you Brandon.
          hudson Hudson added a comment -

          Integrated in Hadoop-trunk-Commit #3711 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3711/)
          HDFS-4784. NPE in FSDirectory.resolvePath(). Contributed by Brandon Li. (Revision 1478276)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478276
          Files :

          • /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/FSDirectory.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 - Integrated in Hadoop-trunk-Commit #3711 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3711/ ) HDFS-4784 . NPE in FSDirectory.resolvePath(). Contributed by Brandon Li. (Revision 1478276) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478276 Files : /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/FSDirectory.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java

          I merged the patch to branch-2.

          sureshms Suresh Srinivas added a comment - I merged the patch to branch-2.
          hadoopqa Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12581483/HDFS-4784.patch3
          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. The javadoc tool did not generate any warning messages.

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

          +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 unit tests in hadoop-hdfs-project/hadoop-hdfs.

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

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/4356//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/4356//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/12581483/HDFS-4784.patch3 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 . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +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 unit tests in hadoop-hdfs-project/hadoop-hdfs. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/4356//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/4356//console This message is automatically generated.
          hudson Hudson added a comment -

          Integrated in Hadoop-Yarn-trunk #201 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/201/)
          HDFS-4784. NPE in FSDirectory.resolvePath(). Contributed by Brandon Li. (Revision 1478276)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478276
          Files :

          • /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/FSDirectory.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 - Integrated in Hadoop-Yarn-trunk #201 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/201/ ) HDFS-4784 . NPE in FSDirectory.resolvePath(). Contributed by Brandon Li. (Revision 1478276) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478276 Files : /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/FSDirectory.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 -

          Integrated in Hadoop-Hdfs-trunk #1390 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1390/)
          HDFS-4784. NPE in FSDirectory.resolvePath(). Contributed by Brandon Li. (Revision 1478276)

          Result = FAILURE
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478276
          Files :

          • /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/FSDirectory.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 - Integrated in Hadoop-Hdfs-trunk #1390 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1390/ ) HDFS-4784 . NPE in FSDirectory.resolvePath(). Contributed by Brandon Li. (Revision 1478276) Result = FAILURE suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478276 Files : /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/FSDirectory.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 -

          Integrated in Hadoop-Mapreduce-trunk #1417 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1417/)
          HDFS-4784. NPE in FSDirectory.resolvePath(). Contributed by Brandon Li. (Revision 1478276)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478276
          Files :

          • /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/FSDirectory.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 - Integrated in Hadoop-Mapreduce-trunk #1417 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1417/ ) HDFS-4784 . NPE in FSDirectory.resolvePath(). Contributed by Brandon Li. (Revision 1478276) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478276 Files : /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/FSDirectory.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 -

          Integrated in Hadoop-trunk-Commit #3712 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3712/)
          HDFS-4785 and HDFS-4784 are moved to 2.0.5 release section (Revision 1478563)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478563
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          hudson Hudson added a comment - Integrated in Hadoop-trunk-Commit #3712 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3712/ ) HDFS-4785 and HDFS-4784 are moved to 2.0.5 release section (Revision 1478563) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478563 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          hudson Hudson added a comment -

          Integrated in Hadoop-Yarn-trunk #202 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/202/)
          HDFS-4785 and HDFS-4784 are moved to 2.0.5 release section (Revision 1478563)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478563
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          hudson Hudson added a comment - Integrated in Hadoop-Yarn-trunk #202 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/202/ ) HDFS-4785 and HDFS-4784 are moved to 2.0.5 release section (Revision 1478563) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478563 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          hudson Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1391 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1391/)
          HDFS-4785 and HDFS-4784 are moved to 2.0.5 release section (Revision 1478563)

          Result = FAILURE
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478563
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1391 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1391/ ) HDFS-4785 and HDFS-4784 are moved to 2.0.5 release section (Revision 1478563) Result = FAILURE suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478563 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          hudson Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #1418 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1418/)
          HDFS-4785 and HDFS-4784 are moved to 2.0.5 release section (Revision 1478563)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478563
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          hudson Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1418 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1418/ ) HDFS-4785 and HDFS-4784 are moved to 2.0.5 release section (Revision 1478563) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1478563 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

          People

            brandonli Brandon Li
            brandonli Brandon Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: