Hadoop Common
  1. Hadoop Common
  2. HADOOP-3409

NameNode should save the root inode into fsimage

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.16.4
    • Fix Version/s: 0.18.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Currently namenode does not save the root inode into the image. Therefore the root's attributes like modification time, permission, and quota in the future are not persistent.

      1. rootImage1.patch
        6 kB
        Hairong Kuang
      2. rootImage.patch
        5 kB
        Hairong Kuang

        Issue Links

          Activity

          Hide
          Hairong Kuang added a comment -

          A patch that attempts to fix the problem.

          Show
          Hairong Kuang added a comment - A patch that attempts to fix the problem.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          Is it correct that root path has (path.length() == 0) ?

          Show
          Tsz Wo Nicholas Sze added a comment - Is it correct that root path has (path.length() == 0) ?
          Hide
          dhruba borthakur added a comment -

          In this patch, the loadFSImage method does the following:

          if (path.length() == 0)

          { // assume that this is the root inode. }

          will it be more explicit if we replace the above piece of code with the following:

          if (i == 0)

          { // the first entry is always the root inode. }
          Show
          dhruba borthakur added a comment - In this patch, the loadFSImage method does the following: if (path.length() == 0) { // assume that this is the root inode. } will it be more explicit if we replace the above piece of code with the following: if (i == 0) { // the first entry is always the root inode. }
          Hide
          Hairong Kuang added a comment -

          if we take Dhruba's suggestion, then we need to bump up the image version number.

          Show
          Hairong Kuang added a comment - if we take Dhruba's suggestion, then we need to bump up the image version number.
          Hide
          Hairong Kuang added a comment -

          > is it correct that root path has (path.length() == 0)
          This how INode.isRoot() is implemented.

          Show
          Hairong Kuang added a comment - > is it correct that root path has (path.length() == 0) This how INode.isRoot() is implemented.
          Hide
          Hairong Kuang added a comment -

          This is a patch with a modified unit test that makes sure that the root is saved to the disk.

          Show
          Hairong Kuang added a comment - This is a patch with a modified unit test that makes sure that the root is saved to the disk.
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12382323/rootImage1.patch
          against trunk revision 657903.

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

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

          +1 javadoc. The javadoc tool did not generate any warning messages.

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

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

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

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

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

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12382323/rootImage1.patch against trunk revision 657903. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/console This message is automatically generated.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          +1 patch looks good.

          Show
          Tsz Wo Nicholas Sze added a comment - +1 patch looks good.
          Hide
          Hairong Kuang added a comment -

          I just committed this.

          Show
          Hairong Kuang added a comment - I just committed this.
          Hide
          Hudson added a comment -
          Show
          Hudson added a comment - Integrated in Hadoop-trunk #499 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/499/ )

            People

            • Assignee:
              Hairong Kuang
              Reporter:
              Hairong Kuang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development