Hadoop Common
  1. Hadoop Common
  2. HADOOP-3329

DatanodeDescriptor objects stored in FSImage may be out dated.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.18.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Changed format of file system image to not store locations of last block.

      Description

      INodeFileUnderConstruction.targets is a DatanodeDescriptor array which stores the locations for last block. These DatanodeDescriptors are serialized and stored in the FSImage. However, a DatanodeDescriptor contains information like IP address and ports. These information may be out dated after a datanode restart.

      We should probably only stored the storageID of a DatanodeDescriptor in FSImage and then lookup the DatanodeDescriptor object from the datanodeMap.

        Issue Links

          Activity

          Hide
          dhruba borthakur added a comment -

          I think it is worthwhile to not store the DatanodeDescriptor in the fsimage at all. The "append" code needs the location of the last block of the file to do lease recovery. In the case when the namenode restarts and before it does lease recovery, it will get the block locations of the last block from datanodes as part of block reports.

          Show
          dhruba borthakur added a comment - I think it is worthwhile to not store the DatanodeDescriptor in the fsimage at all. The "append" code needs the location of the last block of the file to do lease recovery. In the case when the namenode restarts and before it does lease recovery, it will get the block locations of the last block from datanodes as part of block reports.
          Hide
          dhruba borthakur added a comment -

          This patch removes the last block locations that were earlier stored in each persistent lease record.

          Show
          dhruba borthakur added a comment - This patch removes the last block locations that were earlier stored in each persistent lease record.
          Hide
          Hadoop QA added a comment -

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

          +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 tests are needed for this patch.

          +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/2411/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2411/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2411/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2411/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/12381486/lastBlockLocations.patch against trunk revision 653749. +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 tests are needed for this patch. +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/2411/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2411/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2411/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2411/console This message is automatically generated.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          +1 codes look good

          Show
          Tsz Wo Nicholas Sze added a comment - +1 codes look good
          Hide
          dhruba borthakur added a comment -

          I just committed this.

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

            People

            • Assignee:
              dhruba borthakur
              Reporter:
              Tsz Wo Nicholas Sze
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development