hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Inigo Goiri (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11713) Use MoveFileEx to allow renaming a file when the destination exists
Date Thu, 27 Apr 2017 21:31:05 GMT

    [ https://issues.apache.org/jira/browse/HDFS-11713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15987728#comment-15987728
] 

Inigo Goiri commented on HDFS-11713:
------------------------------------

The change from {{rename()}} to {{MoveFile()}} was done by [~cnauroth] in HADOOP-9437 as proposed
by [~ivanmi].
Any comments here?
I think this matches the semantics from Linux.

> 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: 2.7.1, 2.7.3, 3.0.0-alpha1, 3.0.0-alpha2
>            Reporter: Lukas Majercak
>            Assignee: Lukas Majercak
>             Fix For: 3.0.0-alpha2
>
>         Attachments: HDFS-11713.001.patch
>
>
> 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-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message