Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-6235

TestFileJournalManager can fail on Windows due to file locking if tests run out of order.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 2.4.0
    • Fix Version/s: 2.4.1
    • Component/s: namenode, test
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      TestFileJournalManager has multiple tests that reuse the same storage directory: /filejournaltest2. The last test in the suite intentionally leaves a file open to test behavior of an unclosed edit log. On some environments though, tests within a suite execute out of order. In this case, a lock is still held on /filejournaltest2, and subsequent tests fail trying to delete the directory.

      1. HDFS-6235.1.patch
        4 kB
        Chris Nauroth

        Activity

        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk #1755 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1755/)
        HDFS-6235. TestFileJournalManager can fail on Windows due to file locking if tests run out of order. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586692)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileJournalManager.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #1755 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1755/ ) HDFS-6235 . TestFileJournalManager can fail on Windows due to file locking if tests run out of order. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586692 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileJournalManager.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Hdfs-trunk #1730 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1730/)
        HDFS-6235. TestFileJournalManager can fail on Windows due to file locking if tests run out of order. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586692)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileJournalManager.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk #1730 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1730/ ) HDFS-6235 . TestFileJournalManager can fail on Windows due to file locking if tests run out of order. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586692 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileJournalManager.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk #538 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/538/)
        HDFS-6235. TestFileJournalManager can fail on Windows due to file locking if tests run out of order. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586692)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileJournalManager.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #538 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/538/ ) HDFS-6235 . TestFileJournalManager can fail on Windows due to file locking if tests run out of order. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586692 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileJournalManager.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-trunk-Commit #5502 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5502/)
        HDFS-6235. TestFileJournalManager can fail on Windows due to file locking if tests run out of order. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586692)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileJournalManager.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #5502 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5502/ ) HDFS-6235 . TestFileJournalManager can fail on Windows due to file locking if tests run out of order. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586692 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileJournalManager.java
        Hide
        Chris Nauroth added a comment -

        Jing, thank you for the code review. I committed this to trunk, branch-2 and branch-2.4.

        Show
        Chris Nauroth added a comment - Jing, thank you for the code review. I committed this to trunk, branch-2 and branch-2.4.
        Hide
        Chris Nauroth added a comment -

        The failure in TestAvailableSpaceVolumeChoosingPolicy looks unrelated, and I can't repro it. I'm going to commit this.

        Show
        Chris Nauroth added a comment - The failure in TestAvailableSpaceVolumeChoosingPolicy looks unrelated, and I can't repro it. I'm going to commit this.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12639744/HDFS-6235.1.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 failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

        org.apache.hadoop.hdfs.server.datanode.fsdataset.TestAvailableSpaceVolumeChoosingPolicy

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

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/6652//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/6652//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/12639744/HDFS-6235.1.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 failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.server.datanode.fsdataset.TestAvailableSpaceVolumeChoosingPolicy +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/6652//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/6652//console This message is automatically generated.
        Hide
        Jing Zhao added a comment -

        +1 pending Jenkins.

        Show
        Jing Zhao added a comment - +1 pending Jenkins.
        Hide
        Chris Nauroth added a comment -

        The easiest thing to do here is simply to make sure that each test in the suite uses a unique storage directory. That way, there is no chance of collision on locked files between multiple tests in the suite. At the end of the test suite, all of these file handles will get released automatically during process exit. I'm attaching a patch that changes the storage directory names to match the names of the individual tests.

        Show
        Chris Nauroth added a comment - The easiest thing to do here is simply to make sure that each test in the suite uses a unique storage directory. That way, there is no chance of collision on locked files between multiple tests in the suite. At the end of the test suite, all of these file handles will get released automatically during process exit. I'm attaching a patch that changes the storage directory names to match the names of the individual tests.

          People

          • Assignee:
            Chris Nauroth
            Reporter:
            Chris Nauroth
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development