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

TestNameNodeMetrics fails on Windows

    Details

    • Target Version/s:
    • Hadoop Flags:
      Reviewed
    • Flags:
      Patch

      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

        1. HDFS-13673.000.patch
          1 kB
          Zuoming Zhang
        2. HDFS-13673.001.patch
          2 kB
          Zuoming Zhang
        3. TestNameNodeMetrics-testVolumeFailures-Report.000.txt
          3 kB
          Zuoming Zhang
        4. TestNameNodeMetrics-testVolumeFailures-Report.001.txt
          4 kB
          Zuoming Zhang

          Activity

            People

            • Assignee:
              zuzhan Zuoming Zhang
              Reporter:
              zuzhan Zuoming Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: