Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9225

Fix intermittent test failure of TestBlockManager.testBlocksAreNotUnderreplicatedInSingleRack

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: test
    • Labels:
      None

      Description

      TestBlockManager#testBlocksAreNotUnderreplicatedInSingleRack sometimes fails in QA build due to mocking.

      1. HDFS-9225.001.patch
        1 kB
        Masatake Iwasaki

        Activity

        Hide
        iwasakims Masatake Iwasaki added a comment -
        org.mockito.exceptions.misusing.WrongTypeOfReturnValue: 
        BlockCollection$$EnhancerByMockitoWithCGLIB$$da353aed cannot be returned by isRunning()
        isRunning() should return boolean
        	at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.addBlockOnNodes(TestBlockManager.java:443)
        	at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.doTestSingleRackClusterIsSufficientlyReplicated(TestBlockManager.java:376)
        	at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.testBlocksAreNotUnderreplicatedInSingleRack(TestBlockManager.java:368)
        
        Show
        iwasakims Masatake Iwasaki added a comment - org.mockito.exceptions.misusing.WrongTypeOfReturnValue: BlockCollection$$EnhancerByMockitoWithCGLIB$$da353aed cannot be returned by isRunning() isRunning() should return boolean at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.addBlockOnNodes(TestBlockManager.java:443) at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.doTestSingleRackClusterIsSufficientlyReplicated(TestBlockManager.java:376) at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.testBlocksAreNotUnderreplicatedInSingleRack(TestBlockManager.java:368)
        Hide
        iwasakims Masatake Iwasaki added a comment -

        The cause seems to be TestBlockManager#addBlockOnNodes mocking FSNamesytem while the thread launched by BlockManager#processMisReplicatedBlocks is accessing it.

        There are another problems to use BlockManager#processMisReplicatedBlocks in the test.

        • It is asynchronous and there is no way to wait for it finishes.
        • It is no-op if FSNamesystem#isRunning returns false.

        The patch makes test checks the condition by itself instead of calling BlockManager#processMisReplicatedBlocks.

        Show
        iwasakims Masatake Iwasaki added a comment - The cause seems to be TestBlockManager#addBlockOnNodes mocking FSNamesytem while the thread launched by BlockManager#processMisReplicatedBlocks is accessing it. There are another problems to use BlockManager#processMisReplicatedBlocks in the test. It is asynchronous and there is no way to wait for it finishes. It is no-op if FSNamesystem#isRunning returns false. The patch makes test checks the condition by itself instead of calling BlockManager#processMisReplicatedBlocks .
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 8m 31s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
        +1 javac 8m 25s There were no new javac warning messages.
        -1 release audit 0m 17s The applied patch generated 1 release audit warnings.
        +1 checkstyle 1m 26s There were no new checkstyle issues.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 34s mvn install still works.
        +1 eclipse:eclipse 0m 34s The patch built with eclipse:eclipse.
        +1 findbugs 2m 34s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 native 1m 6s Pre-build of native portion
        -1 hdfs tests 227m 45s Tests failed in hadoop-hdfs.
            252m 15s  



        Reason Tests
        Failed unit tests hadoop.hdfs.TestRollingUpgrade
          hadoop.hdfs.server.namenode.TestFileTruncate
          hadoop.hdfs.server.blockmanagement.TestNodeCount



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12766009/HDFS-9225.001.patch
        Optional Tests javac unit findbugs checkstyle
        git revision trunk / 7e2c971
        Release Audit https://builds.apache.org/job/PreCommit-HDFS-Build/12924/artifact/patchprocess/patchReleaseAuditProblems.txt
        hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/12924/artifact/patchprocess/testrun_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/12924/testReport/
        Java 1.7.0_55
        uname Linux asf909.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/12924/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 8m 31s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 8m 25s There were no new javac warning messages. -1 release audit 0m 17s The applied patch generated 1 release audit warnings. +1 checkstyle 1m 26s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 34s mvn install still works. +1 eclipse:eclipse 0m 34s The patch built with eclipse:eclipse. +1 findbugs 2m 34s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 native 1m 6s Pre-build of native portion -1 hdfs tests 227m 45s Tests failed in hadoop-hdfs.     252m 15s   Reason Tests Failed unit tests hadoop.hdfs.TestRollingUpgrade   hadoop.hdfs.server.namenode.TestFileTruncate   hadoop.hdfs.server.blockmanagement.TestNodeCount Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12766009/HDFS-9225.001.patch Optional Tests javac unit findbugs checkstyle git revision trunk / 7e2c971 Release Audit https://builds.apache.org/job/PreCommit-HDFS-Build/12924/artifact/patchprocess/patchReleaseAuditProblems.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/12924/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/12924/testReport/ Java 1.7.0_55 uname Linux asf909.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HDFS-Build/12924/console This message was automatically generated.
        Hide
        andrew.wang Andrew Wang added a comment -

        +1 LGTM, will commit shortly, thanks for finding and fixing this one Masatake!

        Show
        andrew.wang Andrew Wang added a comment - +1 LGTM, will commit shortly, thanks for finding and fixing this one Masatake!
        Hide
        andrew.wang Andrew Wang added a comment -

        Committed to trunk and branch-2, thanks again Masatake!

        Show
        andrew.wang Andrew Wang added a comment - Committed to trunk and branch-2, thanks again Masatake!
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8683 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8683/)
        HDFS-9225. Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8683 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8683/ ) HDFS-9225 . Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #580 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/580/)
        HDFS-9225. Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #580 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/580/ ) HDFS-9225 . Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #1301 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1301/)
        HDFS-9225. Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #1301 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1301/ ) HDFS-9225 . Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Hide
        iwasakims Masatake Iwasaki added a comment -

        Thanks, Andrew Wang.

        Show
        iwasakims Masatake Iwasaki added a comment - Thanks, Andrew Wang .
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #565 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/565/)
        HDFS-9225. Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #565 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/565/ ) HDFS-9225 . Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #523 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/523/)
        HDFS-9225. Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #523 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/523/ ) HDFS-9225 . Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2460 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2460/)
        HDFS-9225. Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2460 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2460/ ) HDFS-9225 . Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2513 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2513/)
        HDFS-9225. Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2513 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2513/ ) HDFS-9225 . Fix intermittent test failure of (wang: rev 3e50f478b9f40fccd7b22f8fbd95d2bfda7867d2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java

          People

          • Assignee:
            iwasakims Masatake Iwasaki
            Reporter:
            iwasakims Masatake Iwasaki
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development