hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jiten...@apache.org
Subject [23/33] hadoop git commit: HADOOP-9658. SnappyCodec#checkNativeCodeLoaded may unexpectedly fail when native code is not loaded. Contributed by Zhijie Shen.
Date Mon, 04 May 2015 23:43:27 GMT
HADOOP-9658. SnappyCodec#checkNativeCodeLoaded may unexpectedly fail when native code is not
loaded. Contributed by Zhijie Shen.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/76fa606e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/76fa606e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/76fa606e

Branch: refs/heads/HDFS-7240
Commit: 76fa606e2d3d04407f2f6b4ea276cce0f60db4be
Parents: bb6ef29
Author: Tsuyoshi Ozawa <ozawa@apache.org>
Authored: Mon May 4 17:05:00 2015 +0900
Committer: Tsuyoshi Ozawa <ozawa@apache.org>
Committed: Mon May 4 17:05:00 2015 +0900

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                   | 3 +++
 .../src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java  | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/76fa606e/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index ea3316a..bb8f900 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -616,6 +616,9 @@ Release 2.7.1 - UNRELEASED
 
     HADOOP-11891. OsSecureRandom should lazily fill its reservoir (asuresh)
 
+    HADOOP-9658. SnappyCodec#checkNativeCodeLoaded may unexpectedly fail when
+    native code is not loaded. (Zhijie Shen via ozawa)
+
 Release 2.7.0 - 2015-04-20
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/76fa606e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java
index 8d2fa1a..2a9c5d0 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java
@@ -60,7 +60,8 @@ public class SnappyCodec implements Configurable, CompressionCodec, DirectDecomp
    * Are the native snappy libraries loaded & initialized?
    */
   public static void checkNativeCodeLoaded() {
-      if (!NativeCodeLoader.buildSupportsSnappy()) {
+      if (!NativeCodeLoader.isNativeCodeLoaded() ||
+          !NativeCodeLoader.buildSupportsSnappy()) {
         throw new RuntimeException("native snappy library not available: " +
             "this version of libhadoop was built without " +
             "snappy support.");


Mime
View raw message