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

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

Thanks Bikas for reviewing!

I would say that we fixed the root cause :) we do want to have native impl for 
getGroups on Windows. However, you bring up a really interesting point:
bq. For any other/new jni based function we will be back to this situation 
because on Windows the native code is always loaded.
Current approach of checking whether the native code is loaded or not makes 
sense to me. If we want to scope this down to a function, we would have to run 
test function call to see if it will return unresolved link error (or fallback 
later) what would be really ugly. The right way to handle cases where we want 
to gracefully degrade functionality and fallback would be to have a config that 
would enable the feature. In this specific instance of the problem, we also 
have a config which is enabled by default. Now we can argue whether it should 
be enabled by default or not, I believe it should, but this is an orthogonal 
discussion. 

Now going back to your point, a good sanity test for whether a feature should 
be enabled by default or not could be that it is supported by all release 
platforms. Make sense? Thoughts?
                
> 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
>             Fix For: trunk-win
>
>         Attachments: HADOOP-9232.branch-trunk-win.jnigroups.2.patch, 
> HADOOP-9232.branch-trunk-win.jnigroups.3.patch, 
> HADOOP-9232.branch-trunk-win.jnigroups.patch, HADOOP-9232.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