Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7877 [Umbrella] Support maintenance state for datanodes
  3. HDFS-11446

TestMaintenanceState#testWithNNAndDNRestart fails intermittently

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha2
    • 2.9.0, 3.0.0-alpha4
    • None
    • None

    Description

      The test TestMaintenanceState#testWithNNAndDNRestart fails in trunk. The stack info( https://builds.apache.org/job/PreCommit-HDFS-Build/18423/testReport/ ):

      java.lang.AssertionError: expected null, but was:<Wrong number of replicas for block BP-1367163238-172.17.0.2-1487836532907:blk_1073741825_1001: expected 3, got 2 ,DatanodeInfoWithStorage[127.0.0.1:42649,DS-c499e6ef-ce14-428b-baef-8cf2a122b248,DISK],DatanodeInfoWithStorage[127.0.0.1:40774,DS-cc484c09-6e32-4804-a337-2871f37b62e1,DISK],pending block # 1 ,under replicated # 0 ,>
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.junit.Assert.failNotNull(Assert.java:664)
      	at org.junit.Assert.assertNull(Assert.java:646)
      	at org.junit.Assert.assertNull(Assert.java:656)
      	at org.apache.hadoop.hdfs.TestMaintenanceState.testWithNNAndDNRestart(TestMaintenanceState.java:731)
      

      The failure seems due to pending block has not been replicated. We can bump the retry times since sometimes the cluster would be busy. Also we can use GenericTestUtils#waitFor to simplified the current compared logic.

      Attachments

        1. HDFS-11446.001.patch
          12 kB
          Yiqun Lin
        2. HDFS-11446.002.patch
          12 kB
          Yiqun Lin
        3. HDFS-11446.003.patch
          12 kB
          Yiqun Lin
        4. HDFS-11446.004.patch
          13 kB
          Yiqun Lin
        5. HDFS-11446-branch-2.002.patch
          13 kB
          Yiqun Lin
        6. HDFS-11446-branch-2.patch
          12 kB
          Yiqun Lin

        Activity

          People

            linyiqun Yiqun Lin
            linyiqun Yiqun Lin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: