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

TestNameNodeMetrics fails on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • 3.1.0, 2.9.1
    • 3.1.0, 2.9.1
    • test

    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

              zuzhan Zuoming Zhang
              zuzhan Zuoming Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: