You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Lukas Majercak (JIRA)" <ji...@apache.org> on 2017/04/27 21:18:04 UTC

[jira] [Created] (HDFS-11713) Use MoveFileEx to allow renaming a file when the destination exists

Lukas Majercak created HDFS-11713:
-------------------------------------

             Summary: Use MoveFileEx to allow renaming a file when the destination exists
                 Key: HDFS-11713
                 URL: https://issues.apache.org/jira/browse/HDFS-11713
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: hdfs, native, rolling upgrades
    Affects Versions: 3.0.0-alpha2, 3.0.0-alpha1, 2.7.3, 2.7.1
            Reporter: Lukas Majercak
            Assignee: Lukas Majercak
             Fix For: 3.0.0-alpha2


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.





--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org