[
https://issues.apache.org/jira/browse/HADOOP-9437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13614292#comment-13614292
]
Chris Nauroth commented on HADOOP-9437:
---------------------------------------
On Windows, most of the native code calls use a Windows API, which sets an
error code visible by calling {{GetLastError}}. These error codes are not
guaranteed to match the POSIX errno values, so in general, it wouldn't make
sense to perform the errno mapping on Windows. However, we can still preserve
the intent of HDFS-4428 and provide a detailed error message on Windows. The
Windows native implementation already maps the value of {{GetLastError}} to a
detailed message by calling {{FormatMessage}}. This becomes the message for
the {{NativeIOException}}. We just need to update the test assertions to check
for these messages instead of the errno values on Windows.
> TestNativeIO#testRenameTo fails on Windows due to assumption that POSIX errno
> is embedded in NativeIOException
> --------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-9437
> URL: https://issues.apache.org/jira/browse/HADOOP-9437
> Project: Hadoop Common
> Issue Type: Bug
> Components: test
> Affects Versions: 3.0.0
> Reporter: Chris Nauroth
> Assignee: Chris Nauroth
>
> HDFS-4428 added a detailed error message for failures to rename files by
> embedding the POSIX errno in the {{NativeIOException}}. On Windows, the
> mapping of errno is not performed, so the errno enum value will not be
> present in the {{NativeIOException}}.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira