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

        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/ )
        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
        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.
        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
        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
        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;

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development