[
https://issues.apache.org/jira/browse/HADOOP-9232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13588716#comment-13588716
]
Chris Nauroth commented on HADOOP-9232:
---------------------------------------
{quote}
However, the "JniBasedUnixGroupsMappingWin" name seems a weird for me.
{quote}
I just realized that I was not completely understanding the objection. I agree
that it is strange to see a name like this that contains both "Unix" and "Win".
It's true that the established pattern is to create platform-agnostic
interfaces on the Java side, but JniBasedUnixGroupsMapping is unique in that
the class name on the Java side already mentions a specific platform.
I suppose the ideal thing would be to remove "Unix" from that class name on the
Java side and then allow for platform-specific C implementation files:
JniBasedGroupsMapping.java, JniBasedUnixGroupsMapping.c, and
JniBasedWinGroupsMapping.c. Unfortunately, I don't think that's feasible for 2
reasons. One problem is that it would greatly expand the scope of the patch.
The other bigger problem is that JniBasedUnixGroupsMapping is mentioned in end
user config files as the value of hadoop.security.group.mapping, so renaming
the Java class risks breaking those users' config files. That might have to be
flagged backwards-incompatible.
I think we're stuck with 1 of 2 practical options: a big conditional
compilation #ifdef in the existing JniBasedUnixGroupsMapping.c, or just accept
the awkward name of JniBasedUnixGroupsMappingWin.c. My personal preference is
for separation by file instead of conditional compilation. This is what Ivan's
current patch does, so I am still +1. What do others think?
> 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