Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-7111

TestNameNodeMetrics fails on Windows

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 3.1.0, 2.9.1
    • Fix Version/s: 3.1.0, 2.9.1
    • Component/s: test
    • Labels:

      Description

      TestNameNodeMetrics fails on Windows

       

      Problem:

      This is because in testVolumeFailures, it tries to call DataNodeTestUtils.injectDataDirFailure on a volume folder. What injectDataDirFailure does is actually modifying the folder name from volume_name to volume_name.origin and create a new file named as volume_name. Inside the folder, it has two things: 1. a directory named as "current", 2. a file named as "in_use.lock". Windows behaves different from Linux when renaming the parent folder of a locked file. Windows prevent you from renaming while Linux allows.

      Fix:

      So in order to inject data failure on to the volume. Instead of renaming the volume folder itself. Rename the folder inside it which doesn't hold a lock. Since the folder inside the volume is "current". Then we only need to inject data failure to volume_name/current.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              zuzhan Zuoming Zhang
              Reporter:
              zuzhan Zuoming Zhang

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment