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

Steve Loughran commented on HADOOP-13684:
-----------------------------------------

I think the original problem is that if snappy is present, but libhadooop 
missing, the error message is "no native lib". But the patch calls 
{{NativeCodeLoader.buildSupportsSnappy()}}, which triggers a native code load, 
which triggers the link exception if the native lib isn't there. Whatever was 
intended, the latest patch doesn't fix.

so this doesn't fix the underlying problem, merely makes the error message even 
less informative than before. 

The only way to fix the original problem is to have a probe for snappy being 
present which doesn't depend on the native lib at all

> Snappy may complain Hadoop is built without snappy if libhadoop is not found.
> -----------------------------------------------------------------------------
>
>                 Key: HADOOP-13684
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13684
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Minor
>              Labels: supportability
>             Fix For: 2.8.0, 3.0.0-alpha2
>
>         Attachments: HADOOP-13684.001.patch, HADOOP-13684.002.patch
>
>
> If for some reason libhadoop can not be found/loaded, Snappy complains Hadoop 
> is not built with Snappy but it actually is.
> {code:title=SnappyCodec.java}
> public static void checkNativeCodeLoaded() {
>       if (!NativeCodeLoader.isNativeCodeLoaded() ||
>           !NativeCodeLoader.buildSupportsSnappy()) {
>         throw new RuntimeException("native snappy library not available: " +
>             "this version of libhadoop was built without " +
>             "snappy support.");
>       }
> {code}
> This case may happen with MAPREDUCE-6577.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to