[ https://issues.apache.org/jira/browse/HADOOP-12550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Loughran updated HADOOP-12550: ------------------------------------ Issue Type: Sub-task (was: Bug) Parent: HADOOP-15461 > NativeIO#renameTo on Windows cannot replace an existing file at the > destination. > -------------------------------------------------------------------------------- > > Key: HADOOP-12550 > URL: https://issues.apache.org/jira/browse/HADOOP-12550 > Project: Hadoop Common > Issue Type: Sub-task > Components: native > Environment: Windows > Reporter: Chris Nauroth > Assignee: Chris Nauroth > Priority: Major > Attachments: HADOOP-12550.001.patch, HADOOP-12550.002.patch > > > {{NativeIO#renameTo}} currently has different semantics on Linux vs. Windows > if a file already exists at the destination. On Linux, it's a passthrough to > the [rename|http://linux.die.net/man/2/rename] syscall, which will replace an > existing file at the destination. On Windows, it's a passthrough to > [MoveFile|https://msdn.microsoft.com/en-us/library/windows/desktop/aa365239%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396], > which cannot replace an existing file at the destination and instead > triggers an error. The easiest way to observe this difference is to run the > HDFS test {{TestRollingUpgrade#testRollback}}. This fails on Windows due to > a block recovery after truncate trying to replace a block at an existing > destination path. This issue proposes to use > [MoveFileEx|https://msdn.microsoft.com/en-us/library/windows/desktop/aa365240(v=vs.85).aspx] > on Windows with the {{MOVEFILE_REPLACE_EXISTING}} flag. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org