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

TestDiskspaceQuotaUpdate fails in trunk due to Bind exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The test TestDiskspaceQuotaUpdate fails sometimes after HDFS-10843, the link addresse: https://builds.apache.org/job/PreCommit-HDFS-Build/17200/testReport/. The stack infos:

       
      java.net.BindException: Problem binding to [localhost:49195] java.net.BindException: Address already in use; For more details see:  http://wiki.apache.org/hadoop/BindException
      

      I found the bind exception was happened in new test method TestDiskspaceQuotaUpdate.testQuotaIssuesWhileCommitting. The related codes:

        public void testQuotaIssuesWhileCommitting() throws Exception {
          ...
          try {
            for (int i = REPLICATION - 1; i > 0; i--) {
              dnprops.add(cluster.stopDataNode(i));
            }
            ...
          } finally {
            for (MiniDFSCluster.DataNodeProperties dnprop : dnprops) {
              cluster.restartDataNode(dnprop, true);
            }
            cluster.waitActive();
          }
        }
      

      I think we can make a simple fix in cluster.restartDataNode(dnprop, true);. The tests in TestDiskspaceQuotaUpdate just care about that if the cluster is up and running. So I think this change will not influence the current logic,

        Activity

        Hide
        linyiqun Yiqun Lin added a comment - - edited

        Attach a simple patch for this. Hi, Erik Krogen, could you help make a confirm that we have to restart datanode with keeping port here? IMO, I think we don't need. Thanks!

        Show
        linyiqun Yiqun Lin added a comment - - edited Attach a simple patch for this. Hi, Erik Krogen , could you help make a confirm that we have to restart datanode with keeping port here? IMO, I think we don't need. Thanks!
        Hide
        ebadger Eric Badger added a comment -

        Since there is no other operations after restarting datanodes, I think this change will not influence the current logic,

        This test uses a single @BeforeClass annotation to start up the mini cluster. So there are operations after restarting datanodes, just not in the specific test that you are running. That being said, the subsequent tests don't know or care what port the datanodes are on for the previous test, they just require that a mini cluster is up and running. So I agree that we can just start the datanodes back up on different ports.

        Show
        ebadger Eric Badger added a comment - Since there is no other operations after restarting datanodes, I think this change will not influence the current logic, This test uses a single @BeforeClass annotation to start up the mini cluster. So there are operations after restarting datanodes, just not in the specific test that you are running. That being said, the subsequent tests don't know or care what port the datanodes are on for the previous test, they just require that a mini cluster is up and running. So I agree that we can just start the datanodes back up on different ports.
        Hide
        linyiqun Yiqun Lin added a comment -

        Good catch, Eric Badger. Make a change in description of this JIRA.

        That being said, the subsequent tests don't know or care what port the datanodes are on for the previous test, they just require that a mini cluster is up and running.

        Agree with this. Pending jenkins, if the related test are all passed, I think the change is making sense,

        Show
        linyiqun Yiqun Lin added a comment - Good catch, Eric Badger . Make a change in description of this JIRA. That being said, the subsequent tests don't know or care what port the datanodes are on for the previous test, they just require that a mini cluster is up and running. Agree with this. Pending jenkins, if the related test are all passed, I think the change is making sense,
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 22s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 8m 5s trunk passed
        +1 compile 0m 52s trunk passed
        +1 checkstyle 0m 31s trunk passed
        +1 mvnsite 0m 57s trunk passed
        +1 mvneclipse 0m 14s trunk passed
        +1 findbugs 1m 46s trunk passed
        +1 javadoc 0m 41s trunk passed
        +1 mvninstall 0m 49s the patch passed
        +1 compile 0m 47s the patch passed
        +1 javac 0m 47s the patch passed
        +1 checkstyle 0m 25s the patch passed
        +1 mvnsite 0m 52s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 49s the patch passed
        +1 javadoc 0m 36s the patch passed
        -1 unit 78m 33s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 22s The patch does not generate ASF License warnings.
        99m 3s



        Reason Tests
        Failed junit tests hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency
          hadoop.hdfs.server.namenode.TestAddStripedBlockInFBR
          hadoop.hdfs.server.datanode.TestDataNodeErasureCodingMetrics
          hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HDFS-11025
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12833942/HDFS-11025.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 71c9ea0b6911 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / d26a1bb
        Default Java 1.8.0_101
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/17201/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17201/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17201/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 22s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 8m 5s trunk passed +1 compile 0m 52s trunk passed +1 checkstyle 0m 31s trunk passed +1 mvnsite 0m 57s trunk passed +1 mvneclipse 0m 14s trunk passed +1 findbugs 1m 46s trunk passed +1 javadoc 0m 41s trunk passed +1 mvninstall 0m 49s the patch passed +1 compile 0m 47s the patch passed +1 javac 0m 47s the patch passed +1 checkstyle 0m 25s the patch passed +1 mvnsite 0m 52s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 49s the patch passed +1 javadoc 0m 36s the patch passed -1 unit 78m 33s hadoop-hdfs in the patch failed. +1 asflicense 0m 22s The patch does not generate ASF License warnings. 99m 3s Reason Tests Failed junit tests hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency   hadoop.hdfs.server.namenode.TestAddStripedBlockInFBR   hadoop.hdfs.server.datanode.TestDataNodeErasureCodingMetrics   hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-11025 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12833942/HDFS-11025.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 71c9ea0b6911 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / d26a1bb Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/17201/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17201/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17201/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        xkrogen Erik Krogen added a comment -

        Agreed, shouldn't be necessary to keep the same port across the restarts. Thanks Yiqun Lin for catching and fixing this and Eric Badger for taking a look.

        Show
        xkrogen Erik Krogen added a comment - Agreed, shouldn't be necessary to keep the same port across the restarts. Thanks Yiqun Lin for catching and fixing this and Eric Badger for taking a look.
        Hide
        linyiqun Yiqun Lin added a comment -

        Thanks Erik Krogen for the confirm. The failed test are not related. Wait for someone to make the final review and commit, .

        Show
        linyiqun Yiqun Lin added a comment - Thanks Erik Krogen for the confirm. The failed test are not related. Wait for someone to make the final review and commit, .
        Hide
        ebadger Eric Badger added a comment -

        +1 non binding

        Show
        ebadger Eric Badger added a comment - +1 non binding
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        LGTM, will commit

        Show
        brahmareddy Brahma Reddy Battula added a comment - LGTM, will commit
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        Committed to trunk,branch-2 and branch-2.8..Yiqun Lin thanks for your contribution and thanks to Eric Badger and Erik Krogen for additional review.

        Show
        brahmareddy Brahma Reddy Battula added a comment - Committed to trunk,branch-2 and branch-2.8.. Yiqun Lin thanks for your contribution and thanks to Eric Badger and Erik Krogen for additional review.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10641 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10641/)
        HDFS-11025. TestDiskspaceQuotaUpdate fails in trunk due to Bind (brahma: rev 73504b1bdc4b93c64741de5eb9d022817fdfa22f)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDiskspaceQuotaUpdate.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10641 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10641/ ) HDFS-11025 . TestDiskspaceQuotaUpdate fails in trunk due to Bind (brahma: rev 73504b1bdc4b93c64741de5eb9d022817fdfa22f) (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDiskspaceQuotaUpdate.java
        Hide
        linyiqun Yiqun Lin added a comment -

        Thanks Brahma Reddy Battula for the commit in this JIRA and in HDFS-10699!

        Show
        linyiqun Yiqun Lin added a comment - Thanks Brahma Reddy Battula for the commit in this JIRA and in HDFS-10699 !

          People

          • Assignee:
            linyiqun Yiqun Lin
            Reporter:
            linyiqun Yiqun Lin
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development