Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7947 Fix HDFS unit test failures on Windows
  3. HDFS-11399

Many tests fails in Windows due to injecting disk failures

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to IssueMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha2
    • 3.1.0, 2.10.0, 2.9.1, 3.0.3
    • None
    • Reviewed

    Description

      Found many tests run failed in Windows due to using DataNodeTestUtils#injectDataDirFailure. One of the failure test:

      java.io.IOException: Failed to rename D:\work-project\hadoop\hadoop-hdfs-project\hadoop-hdfs\target\test\data\dfs\data\data2 to D:\work-project\hadoop\hadoop-hdfs-project\hadoop-hdfs\target\test\data\dfs\data\data2.origin.
      	at org.apache.hadoop.hdfs.server.datanode.DataNodeTestUtils.injectDataDirFailure(DataNodeTestUtils.java:156)
      	at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean.testStorageTypeStatsWhenStorageFailed(TestBlockStatsMXBean.java:176)
      

      The root cause of this is that the test method uses DataNodeTestUtils#injectDataDirFailure to injects disk failures but however missing the compare operation assumeNotWindows. Currently DataNodeTestUtils#injectDataDirFailure is not supported in Windows then the test fails.

      It would be better to add assumeNotWindows into DataNodeTestUtils#injectDataDirFailure in case we forget to add this in test methods.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment