[ 
https://issues.apache.org/jira/browse/HADOOP-9232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13583774#comment-13583774
 ] 

Ivan Mitic commented on HADOOP-9232:
------------------------------------

{quote}However, the "JniBasedUnixGroupsMappingWin" name seems a weird for me.
I think a better approach may be to create a seperate 
JniBasedWinGroupsMapping.java class and add some Java code to use choose 
JniBasedWinGroupsMapping and JniBasedUnixGroupsMapping based on the platform. 
This way we can also seperate the native implementation more easily in the 
future.
{quote}
Thanks Chuan for the review! Actually, I will not agree on this one. We should 
try to make Java side interfaces platform independent (where we can) and only 
have platform dependent implementations. In this specific case, the interface 
is quite simple and works well cross platforms so I think this is fine. Let me 
know what you 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

Reply via email to