HADOOP-9658. SnappyCodec#checkNativeCodeLoaded may unexpectedly fail when native code is not loaded. Contributed by Zhijie Shen.
(cherry picked from commit 76fa606e2d
)
This commit is contained in:
parent
7e03bda3e7
commit
1e1ebbb42b
|
@ -164,6 +164,9 @@ Release 2.7.1 - UNRELEASED
|
||||||
|
|
||||||
HADOOP-11891. OsSecureRandom should lazily fill its reservoir (asuresh)
|
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
|
Release 2.7.0 - 2015-04-20
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -60,7 +60,8 @@ public class SnappyCodec implements Configurable, CompressionCodec, DirectDecomp
|
||||||
* Are the native snappy libraries loaded & initialized?
|
* Are the native snappy libraries loaded & initialized?
|
||||||
*/
|
*/
|
||||||
public static void checkNativeCodeLoaded() {
|
public static void checkNativeCodeLoaded() {
|
||||||
if (!NativeCodeLoader.buildSupportsSnappy()) {
|
if (!NativeCodeLoader.isNativeCodeLoaded() ||
|
||||||
|
!NativeCodeLoader.buildSupportsSnappy()) {
|
||||||
throw new RuntimeException("native snappy library not available: " +
|
throw new RuntimeException("native snappy library not available: " +
|
||||||
"this version of libhadoop was built without " +
|
"this version of libhadoop was built without " +
|
||||||
"snappy support.");
|
"snappy support.");
|
||||||
|
|
Loading…
Reference in New Issue