Browse Source

HADOOP-12638. UnsatisfiedLinkError while checking ISA-L in checknative command. (Kai Sasaki via Colin P. McCabe)

Colin Patrick Mccabe 9 years ago
parent
commit
bc72422981

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -540,6 +540,9 @@ Trunk (Unreleased)
 
     HADOOP-12553. [JDK8] Fix javadoc error caused by illegal tag. (aajisaka)
 
+    HADOOP-12638. UnsatisfiedLinkError while checking ISA-L in checknative
+    command. (Kai Sasaki via Colin P. McCabe)
+
   OPTIMIZATIONS
 
     HADOOP-7761. Improve the performance of raw comparisons. (todd)

+ 5 - 5
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NativeLibraryChecker.java

@@ -95,12 +95,12 @@ public class NativeLibraryChecker {
         snappyLibraryName = SnappyCodec.getLibraryName();
       }
 
-      isalDetail = ErasureCodeNative.getLoadingFailureReason();
-      if (isalDetail != null) {
-        isalLoaded = false;
-      } else {
+      try {
+        isalDetail = ErasureCodeNative.getLoadingFailureReason();
         isalDetail = ErasureCodeNative.getLibraryName();
         isalLoaded = true;
+      } catch (UnsatisfiedLinkError e) {
+        isalLoaded = false;
       }
 
       openSslDetail = OpensslCipher.getLoadingFailureReason();
@@ -146,7 +146,7 @@ public class NativeLibraryChecker {
     }
 
     if ((!nativeHadoopLoaded) || (Shell.WINDOWS && (!winutilsExists)) ||
-        (checkAll && !(zlibLoaded && snappyLoaded && lz4Loaded && bzip2Loaded))) {
+        (checkAll && !(zlibLoaded && snappyLoaded && lz4Loaded && bzip2Loaded && isalLoaded))) {
       // return 1 to indicated check failed
       ExitUtil.terminate(1);
     }