Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
Windows
Description
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 syscall, which will replace an existing file at the destination. On Windows, it's a passthrough to MoveFile, 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 on Windows with the MOVEFILE_REPLACE_EXISTING flag.
Attachments
Attachments
Issue Links
- relates to
-
HADOOP-14434 Use MoveFileEx to allow renaming a file when the destination exists
- Resolved