hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9658) SnappyCodec#checkNativeCodeLoaded may unexpectedly fail when native code is not loaded
Date Mon, 04 May 2015 08:14:06 GMT

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

Hudson commented on HADOOP-9658:
--------------------------------

FAILURE: Integrated in Hadoop-trunk-Commit #7721 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/7721/])
HADOOP-9658. SnappyCodec#checkNativeCodeLoaded may unexpectedly fail when native code is not
loaded. Contributed by Zhijie Shen. (ozawa: rev 76fa606e2d3d04407f2f6b4ea276cce0f60db4be)
* hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java
* hadoop-common-project/hadoop-common/CHANGES.txt


> SnappyCodec#checkNativeCodeLoaded may unexpectedly fail when native code is not loaded
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9658
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9658
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Zhijie Shen
>            Assignee: Zhijie Shen
>             Fix For: 2.7.1
>
>         Attachments: HADOOP-9658.1.patch
>
>
> {code}
>   public static void checkNativeCodeLoaded() {
>       if (!NativeCodeLoader.buildSupportsSnappy()) {
>         throw new RuntimeException("native snappy library not available: " +
>             "this version of libhadoop was built without " +
>             "snappy support.");
>       }
>       if (!SnappyCompressor.isNativeCodeLoaded()) {
>         throw new RuntimeException("native snappy library not available: " +
>             "SnappyCompressor has not been loaded.");
>       }
>       if (!SnappyDecompressor.isNativeCodeLoaded()) {
>         throw new RuntimeException("native snappy library not available: " +
>             "SnappyDecompressor has not been loaded.");
>       }
>   }
> {code}
> buildSupportsSnappy is native method. If the native code is not loaded, the method will
be missing. Therefore, whether the native code is loaded or not, the first runtime exception
will not be thrown.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message