Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.5.0
    • Component/s: test
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      From https://builds.apache.org/job/PreCommit-HDFS-Build/6511//testReport/org.apache.hadoop.hdfs/TestSafeMode/testInitializeReplQueuesEarly/ :

      java.lang.AssertionError: expected:<13> but was:<0>
      	at org.junit.Assert.fail(Assert.java:93)
      	at org.junit.Assert.failNotEquals(Assert.java:647)
      	at org.junit.Assert.assertEquals(Assert.java:128)
      	at org.junit.Assert.assertEquals(Assert.java:472)
      	at org.junit.Assert.assertEquals(Assert.java:456)
      	at org.apache.hadoop.hdfs.TestSafeMode.testInitializeReplQueuesEarly(TestSafeMode.java:212)
      

        Issue Links

          Activity

          Ted Yu created issue -
          Hide
          Arpit Agarwal added a comment -

          Fix a couple of race conditions with the test case:

          1. The waitFor predicate was just checking that safeModeBlocks > 0 which can happen before block reports from all storages attached to the DN are processed. If the subsequent block reports come after this check and before we sample getSafeModeSafeBlocks, then safe will be wrong. Fixed it by adding a metric for storageBlockReportOps and checking it.
          2. Put the check for getUnderReplicatedBlocks in a loop since the processing is asynch and may be delayed.
          Show
          Arpit Agarwal added a comment - Fix a couple of race conditions with the test case: The waitFor predicate was just checking that safeModeBlocks > 0 which can happen before block reports from all storages attached to the DN are processed. If the subsequent block reports come after this check and before we sample getSafeModeSafeBlocks , then safe will be wrong. Fixed it by adding a metric for storageBlockReportOps and checking it. Put the check for getUnderReplicatedBlocks in a loop since the processing is asynch and may be delayed.
          Arpit Agarwal made changes -
          Field Original Value New Value
          Attachment HDFS-6160.01.patch [ 12639311 ]
          Arpit Agarwal made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Arpit Agarwal made changes -
          Assignee Arpit Agarwal [ arpitagarwal ]
          Arpit Agarwal made changes -
          Affects Version/s 2.4.0 [ 12326143 ]
          Arpit Agarwal made changes -
          Component/s test [ 12312916 ]
          Arpit Agarwal made changes -
          Issue Type Test [ 6 ] Bug [ 1 ]
          Arpit Agarwal made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          Hide
          Hadoop QA added a comment -

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

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

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

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

          +1 javadoc. There were no new javadoc warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +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 passed unit tests in hadoop-hdfs-project/hadoop-hdfs.

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

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/6625//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/6625//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/12639311/HDFS-6160.01.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +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 passed unit tests in hadoop-hdfs-project/hadoop-hdfs. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/6625//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/6625//console This message is automatically generated.
          Hide
          Sanjay Radia added a comment -

          +1

          Show
          Sanjay Radia added a comment - +1
          Hide
          Arpit Agarwal added a comment -

          Thanks Sanjay! I committed it to trunk and branch-2.

          Show
          Arpit Agarwal added a comment - Thanks Sanjay! I committed it to trunk and branch-2.
          Arpit Agarwal made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags Reviewed [ 10343 ]
          Target Version/s 2.5.0 [ 12326264 ]
          Fix Version/s 3.0.0 [ 12320356 ]
          Fix Version/s 2.5.0 [ 12326264 ]
          Resolution Fixed [ 1 ]
          Hide
          Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #5476 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5476/)
          HDFS-6160. TestSafeMode occasionally fails. (Contributed by Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586007)

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
          Show
          Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #5476 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5476/ ) HDFS-6160 . TestSafeMode occasionally fails. (Contributed by Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586007 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
          Arpit Agarwal made changes -
          Link This issue duplicates HDFS-5983 [ HDFS-5983 ]
          Mit Desai made changes -
          Link This issue is duplicated by HDFS-5983 [ HDFS-5983 ]
          Arpit Agarwal made changes -
          Link This issue duplicates HDFS-5983 [ HDFS-5983 ]
          Hide
          Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #535 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/535/)
          HDFS-6160. TestSafeMode occasionally fails. (Contributed by Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586007)

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
          Show
          Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #535 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/535/ ) HDFS-6160 . TestSafeMode occasionally fails. (Contributed by Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586007 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
          Hide
          Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #1753 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1753/)
          HDFS-6160. TestSafeMode occasionally fails. (Contributed by Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586007)

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
          Show
          Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #1753 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1753/ ) HDFS-6160 . TestSafeMode occasionally fails. (Contributed by Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586007 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
          Hide
          Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #1728 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1728/)
          HDFS-6160. TestSafeMode occasionally fails. (Contributed by Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586007)

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
          Show
          Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #1728 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1728/ ) HDFS-6160 . TestSafeMode occasionally fails. (Contributed by Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586007 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
          Karthik Kambatla (Inactive) made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Allen Wittenauer made changes -
          Fix Version/s 3.0.0 [ 12320356 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Patch Available Patch Available
          13d 6h 11m 1 Arpit Agarwal 09/Apr/14 01:47
          Patch Available Patch Available Resolved Resolved
          15h 28m 1 Arpit Agarwal 09/Apr/14 17:16
          Resolved Resolved Closed Closed
          127d 13h 25m 1 Karthik Kambatla (Inactive) 15/Aug/14 06:41

            People

            • Assignee:
              Arpit Agarwal
              Reporter:
              Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development