Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2061

two minor bugs in BlockManager block report processing

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.0
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In a recent review of HDFS-1295 patches (speedup for block report processing), found two very minor bugs in BlockManager, as documented in following comments.

        Activity

        Matt Foley created issue -
        Hide
        Matt Foley added a comment -

        addStoredBlock() is not currently robust against future sub-classing of BlockInfoUnderConstruction:

        //currently uses
        if (block.getClass() == BlockInfoUnderConstruction.class) {...}
        //should be
        if (block instanceof BlockInfoUnderConstruction) {...}
        

        processReportedBlock() had a left-over "this" in an assert message, from being moved from DatanodeDescriptor to BlockManager:

        //currently uses
        ... + " in recentInvalidatesSet should not appear in DN " + this;
        //should be
        ... + " in recentInvalidatesSet should not appear in DN " + dn;
        
        Show
        Matt Foley added a comment - addStoredBlock() is not currently robust against future sub-classing of BlockInfoUnderConstruction: //currently uses if (block.getClass() == BlockInfoUnderConstruction.class) {...} //should be if (block instanceof BlockInfoUnderConstruction) {...} processReportedBlock() had a left-over "this" in an assert message, from being moved from DatanodeDescriptor to BlockManager: //currently uses ... + " in recentInvalidatesSet should not appear in DN " + this ; //should be ... + " in recentInvalidatesSet should not appear in DN " + dn;
        Matt Foley made changes -
        Field Original Value New Value
        Attachment HDFS-2061.patch [ 12482084 ]
        Matt Foley made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Hadoop QA added a comment -

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

        +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 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 (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 failed these core unit tests:
        org.apache.hadoop.cli.TestHDFSCLI

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

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/766//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/766//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/766//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/12482084/HDFS-2061.patch against trunk revision 1134397. +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 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 (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 failed these core unit tests: org.apache.hadoop.cli.TestHDFSCLI +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/766//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/766//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/766//console This message is automatically generated.
        Hide
        Suresh Srinivas added a comment -

        Nice catch. +1 for the change.

        Show
        Suresh Srinivas added a comment - Nice catch. +1 for the change.
        Hide
        Matt Foley added a comment -

        Committed to trunk. Thanks for the review, Suresh!

        Note: not needed in yahoo-merge branch.

        Show
        Matt Foley added a comment - Committed to trunk. Thanks for the review, Suresh! Note: not needed in yahoo-merge branch.
        Matt Foley made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #746 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/746/)

        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #746 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/746/ )
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #699 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/699/)

        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #699 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/699/ )
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        21m 53s 1 Matt Foley 10/Jun/11 19:05
        Patch Available Patch Available Resolved Resolved
        3h 57m 1 Matt Foley 10/Jun/11 23:03
        Resolved Resolved Closed Closed
        157d 2h 49m 1 Arun C Murthy 15/Nov/11 00:52

          People

          • Assignee:
            Matt Foley
            Reporter:
            Matt Foley
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development