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

Use MoveFileEx to allow renaming a file when the destination exists

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.1, 2.7.3, 3.0.0-alpha1, 3.0.0-alpha2
    • 2.7.4, 3.0.0-alpha4
    • native
    • 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. HDFS-11713.001.patch
          5 kB
          Lukas Majercak
        2. HADOOP-14434.002.patch
          2 kB
          Christopher Douglas

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: