hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Douglas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-14434) Use MoveFileEx to allow renaming a file when the destination exists
Date Wed, 17 May 2017 21:52:05 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-14434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris Douglas updated HADOOP-14434:
-----------------------------------
    Attachment: HADOOP-14434.002.patch

v002
* Reverted spurious change to {{TestRollingUpgrade}}
* {{TestNativeIO}} deletes {{TEST_DIR}} in a {{\@Before}} method, so the try/finally change
is redundant

>From my read of the [docs|https://msdn.microsoft.com/en-us/library/windows/desktop/aa365240(v=vs.85).aspx]
this change looks correct, but I haven't tested it. [~lukmajercak], does this look OK to you?

> Use MoveFileEx to allow renaming a file when the destination exists
> -------------------------------------------------------------------
>
>                 Key: HADOOP-14434
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14434
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: native
>    Affects Versions: 2.7.1, 2.7.3, 3.0.0-alpha1, 3.0.0-alpha2
>            Reporter: Lukas Majercak
>            Assignee: Lukas Majercak
>              Labels: windows
>         Attachments: HADOOP-14434.002.patch, 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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message