[
https://issues.apache.org/jira/browse/HADOOP-9232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13578764#comment-13578764
]
Ivan Mitic commented on HADOOP-9232:
------------------------------------
Thanks Chris for the review, all good comments!
My responses are below:
1. The functions are actually slightly different and I wanted to keep them that
way. Nativeio function throws a NativeIOException exception (not IOException).
Also, if you take a closer look nativeio exposes some static initialization
methods which are used to initialize nioe_clazz and nioe_ctor, so all is
encapsulated within nativeio and I wanted to keep it this way. Let me know if
this sounds good.
2. Yes, this is what we need. THROW macro definition expects char* (not
WCHAR*), hence the difference. In nativeio#throw_ie, we use a slightly
different conversion patterns
3. Fixed
4. I saw this as well. I inherited the problem from the linux implementation.
As you said, it seems that the only side effect could be an extra memory
allocation which isn't too bad.
5. Thanks, fixed
Attached is the updated patch. Let me know if it looks good.
> JniBasedUnixGroupsMappingWithFallback fails on Windows with
> UnsatisfiedLinkError
> --------------------------------------------------------------------------------
>
> Key: HADOOP-9232
> URL: https://issues.apache.org/jira/browse/HADOOP-9232
> Project: Hadoop Common
> Issue Type: Bug
> Components: native, security
> Affects Versions: trunk-win
> Reporter: Chris Nauroth
> Assignee: Ivan Mitic
> Attachments: HADOOP-9232.branch-trunk-win.jnigroups.2.patch,
> HADOOP-9232.branch-trunk-win.jnigroups.3.patch,
> HADOOP-9232.branch-trunk-win.jnigroups.patch
>
>
> {{JniBasedUnixGroupsMapping}} calls native code which isn't implemented
> properly for Windows, causing {{UnsatisfiedLinkError}}. The fallback logic
> in {{JniBasedUnixGroupsMappingWithFallback}} works by checking if the native
> code is loaded during startup. In this case, hadoop.dll is present and
> loaded, but it doesn't contain the right code. There will be no attempt to
> fallback to {{ShellBasedUnixGroupsMapping}}.
--
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