Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Commit 7da14fa

Browse files
Improve error handling (#3)
1 parent 58f1d95 commit 7da14fa

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

hadoop_qat_wrapper/src/main/java/org/apache/hadoop/util/QatNativeCodeLoader.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,8 @@ public class QatNativeCodeLoader {
4848
LOG.debug("Loaded the native-qat library");
4949
nativeCodeLoaded = true;
5050
} catch (Throwable t) {
51-
// Ignore failure to load
52-
if(LOG.isDebugEnabled()) {
53-
LOG.debug("Failed to load native-qat with error: " + t);
54-
LOG.debug("java.library.path=" +
55-
System.getProperty("java.library.path"));
56-
}
51+
LOG.error("Failed to load native-qat with error: ", t);
52+
LOG.error("java.library.path=" + System.getProperty("java.library.path"));
5753
}
5854

5955
if (!nativeCodeLoaded) {

hadoop_qat_wrapper/src/main/native/QatCompressor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_qat_QatCompressor_init
6464
if (!libqatzip) {
6565
char msg[1000];
6666
snprintf(msg, 1000, "%s (%s)!", "Cannot load " HADOOP_QAT_LIBRARY, dlerror());
67-
THROW(env, "java/lang/UnsatisfiedLinkError1", msg);
67+
THROW(env, "java/lang/UnsatisfiedLinkError", msg);
6868
return;
6969
}
7070
#endif

0 commit comments

Comments
 (0)