Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-support/bin/dist-copynativelibs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ if [[ -d "${LIB_DIR}" ]]; then

bundle_native_lib "${ISALBUNDLE}" "isal.lib" "libisal." "${ISALLIB}"

bundle_native_lib "${PMDKBUNDLE}" "pmdk.lib" "pmdk" "${PMDKLIB}"
bundle_native_lib "${PMDKBUNDLE}" "pmdk.lib" "libpmem." "${PMDKLIB}"
fi

# Windows
Expand Down
2 changes: 2 additions & 0 deletions hadoop-common-project/hadoop-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,8 @@
<require.isal>false</require.isal>
<isal.prefix></isal.prefix>
<isal.lib></isal.lib>
<require.pmdk>false</require.pmdk>
<pmdk.lib></pmdk.lib>
<require.openssl>false</require.openssl>
<runningWithNative>true</runningWithNative>
<bundle.openssl.in.bin>false</bundle.openssl.in.bin>
Expand Down
2 changes: 1 addition & 1 deletion hadoop-common-project/hadoop-common/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ if(REQUIRE_PMDK)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${STORED_CMAKE_FIND_LIBRARY_SUFFIXES})

if(PMDK_LIBRARY)
GET_FILENAME_COMPONENT(HADOOP_PMDK_LIBRARY ${PMDK_LIBRARY} REALPATH)
GET_FILENAME_COMPONENT(HADOOP_PMDK_LIBRARY ${PMDK_LIBRARY} NAME)
set(PMDK_SOURCE_FILES ${SRC}/io/nativeio/pmdk_load.c)
else(PMDK_LIBRARY)
MESSAGE(FATAL_ERROR "The required PMDK library is NOT found. PMDK_LIBRARY=${PMDK_LIBRARY}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1639,12 +1639,15 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_io_nativeio_NativeIO_00024POSIX_pm

JNIEXPORT jstring JNICALL Java_org_apache_hadoop_io_nativeio_NativeIO_00024POSIX_getPmdkLibPath
(JNIEnv * env, jclass thisClass) {
jstring libpath = NULL;

#ifdef HADOOP_PMDK_LIBRARY
libpath = (*env)->NewStringUTF(env, HADOOP_PMDK_LIBRARY);
#endif
return libpath;
#if (defined UNIX) && (defined HADOOP_PMDK_LIBRARY)
if (pmdkLoader == NULL) {
THROW(env, "java/lang/UnsatisfiedLinkError",
"Unavailable: library not loaded yet");
} else {
return (*env)->NewStringUTF(env, pmdkLoader->libname);
}
#endif
return (jstring)NULL;
}

#ifdef __cplusplus
Expand Down
4 changes: 4 additions & 0 deletions hadoop-project-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
<bundle.zstd.in.bin>false</bundle.zstd.in.bin>
<isal.lib></isal.lib>
<bundle.isal>false</bundle.isal>
<pmdk.lib></pmdk.lib>
<bundle.pmdk>false</bundle.pmdk>
<openssl.lib></openssl.lib>
<bundle.openssl>false</bundle.openssl>
<bundle.openssl.in.bin>false</bundle.openssl.in.bin>
Expand Down Expand Up @@ -336,6 +338,8 @@
<argument>--artifactid=${project.artifactId}</argument>
<argument>--isalbundle=${bundle.isal}</argument>
<argument>--isallib=${isal.lib}</argument>
<argument>--pmdkbundle=${bundle.pmdk}</argument>
<argument>--pmdklib=${pmdk.lib}</argument>
<argument>--openssllib=${openssl.lib}</argument>
<argument>--opensslbinbundle=${bundle.openssl.in.bin}</argument>
<argument>--openssllibbundle=${bundle.openssl}</argument>
Expand Down