Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14434

Use MoveFileEx to allow renaming a file when the destination exists

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.1, 2.7.3, 3.0.0-alpha1, 3.0.0-alpha2
    • Fix Version/s: 2.7.4, 3.0.0-alpha4
    • Component/s: native
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      The NativeIO.c#renameTo0 currently uses MoveFile Windows system call, which fails when renaming a file to a destination that already exists.

      This makes the TestRollingUpgrade.testRollback test fail on Windows, as during that execution, a DataNode tries to rename block's meta file to a destination that exists.

      The proposal is to change to using MoveFileEx Windows call, and passing in MOVEFILE_REPLACE_EXISTING flag to force the renaming.

        Attachments

        1. HADOOP-14434.002.patch
          2 kB
          Chris Douglas
        2. HDFS-11713.001.patch
          5 kB
          Lukas Majercak

          Issue Links

            Activity

              People

              • Assignee:
                lukmajercak Lukas Majercak
                Reporter:
                lukmajercak Lukas Majercak
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: