Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLUTEN-6148][CORE] Simplify JniLibLoader loading mechanism for native libraries #6791

Merged
merged 4 commits into from
Aug 14, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@ import org.apache.gluten.vectorized.JniLibLoader

class SharedLibraryLoaderCentos7 extends SharedLibraryLoader {
override def loadLib(loader: JniLibLoader): Unit = {
loader
.newTransaction()
.loadAndCreateLink("libboost_atomic.so.1.84.0", "libboost_atomic.so", false)
.loadAndCreateLink("libboost_thread.so.1.84.0", "libboost_thread.so", false)
.loadAndCreateLink("libboost_system.so.1.84.0", "libboost_system.so", false)
.loadAndCreateLink("libboost_regex.so.1.84.0", "libboost_regex.so", false)
.loadAndCreateLink("libboost_program_options.so.1.84.0", "libboost_program_options.so", false)
.loadAndCreateLink("libboost_filesystem.so.1.84.0", "libboost_filesystem.so", false)
.loadAndCreateLink("libboost_context.so.1.84.0", "libboost_context.so", false)
.loadAndCreateLink("libdouble-conversion.so.1", "libdouble-conversion.so", false)
.loadAndCreateLink("libevent-2.0.so.5", "libevent-2.0.so", false)
.loadAndCreateLink("libgflags.so.2.2", "libgflags.so", false)
.loadAndCreateLink("libglog.so.0", "libglog.so", false)
.loadAndCreateLink("libntlm.so.0", "libntlm.so", false)
.loadAndCreateLink("libgsasl.so.7", "libgsasl.so", false)
.loadAndCreateLink("libprotobuf.so.32", "libprotobuf.so", false)
.loadAndCreateLink("libhdfs3.so.1", "libhdfs3.so", false)
.loadAndCreateLink("libre2.so.10", "libre2.so", false)
.loadAndCreateLink("libzstd.so.1", "libzstd.so", false)
.loadAndCreateLink("liblz4.so.1", "liblz4.so", false)
.commit()
loader.loadAndCreateLink("libboost_atomic.so.1.84.0", "libboost_atomic.so", false)
loader.loadAndCreateLink("libboost_thread.so.1.84.0", "libboost_thread.so", false)
loader.loadAndCreateLink("libboost_system.so.1.84.0", "libboost_system.so", false)
loader.loadAndCreateLink("libboost_regex.so.1.84.0", "libboost_regex.so", false)
loader.loadAndCreateLink(
"libboost_program_options.so.1.84.0",
"libboost_program_options.so",
false)
loader.loadAndCreateLink("libboost_filesystem.so.1.84.0", "libboost_filesystem.so", false)
loader.loadAndCreateLink("libboost_context.so.1.84.0", "libboost_context.so", false)
loader.loadAndCreateLink("libdouble-conversion.so.1", "libdouble-conversion.so", false)
loader.loadAndCreateLink("libevent-2.0.so.5", "libevent-2.0.so", false)
loader.loadAndCreateLink("libgflags.so.2.2", "libgflags.so", false)
loader.loadAndCreateLink("libglog.so.0", "libglog.so", false)
loader.loadAndCreateLink("libntlm.so.0", "libntlm.so", false)
loader.loadAndCreateLink("libgsasl.so.7", "libgsasl.so", false)
loader.loadAndCreateLink("libprotobuf.so.32", "libprotobuf.so", false)
loader.loadAndCreateLink("libhdfs3.so.1", "libhdfs3.so", false)
loader.loadAndCreateLink("libre2.so.10", "libre2.so", false)
loader.loadAndCreateLink("libzstd.so.1", "libzstd.so", false)
loader.loadAndCreateLink("liblz4.so.1", "liblz4.so", false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@ import org.apache.gluten.vectorized.JniLibLoader

class SharedLibraryLoaderCentos8 extends SharedLibraryLoader {
override def loadLib(loader: JniLibLoader): Unit = {
loader
.newTransaction()
.loadAndCreateLink("libboost_atomic.so.1.84.0", "libboost_atomic.so", false)
.loadAndCreateLink("libboost_thread.so.1.84.0", "libboost_thread.so", false)
.loadAndCreateLink("libboost_system.so.1.84.0", "libboost_system.so", false)
.loadAndCreateLink("libicudata.so.60", "libicudata.so", false)
.loadAndCreateLink("libicuuc.so.60", "libicuuc.so", false)
.loadAndCreateLink("libicui18n.so.60", "libicui18n.so", false)
.loadAndCreateLink("libboost_regex.so.1.84.0", "libboost_regex.so", false)
.loadAndCreateLink("libboost_program_options.so.1.84.0", "libboost_program_options.so", false)
.loadAndCreateLink("libboost_filesystem.so.1.84.0", "libboost_filesystem.so", false)
.loadAndCreateLink("libboost_context.so.1.84.0", "libboost_context.so", false)
.loadAndCreateLink("libdouble-conversion.so.3", "libdouble-conversion.so", false)
.loadAndCreateLink("libevent-2.1.so.6", "libevent-2.1.so", false)
.loadAndCreateLink("libgflags.so.2.2", "libgflags.so", false)
.loadAndCreateLink("libglog.so.1", "libglog.so", false)
.loadAndCreateLink("libdwarf.so.1", "libdwarf.so", false)
.loadAndCreateLink("libidn.so.11", "libidn.so", false)
.loadAndCreateLink("libntlm.so.0", "libntlm.so", false)
.loadAndCreateLink("libgsasl.so.7", "libgsasl.so", false)
.loadAndCreateLink("libprotobuf.so.32", "libprotobuf.so", false)
.loadAndCreateLink("libhdfs3.so.1", "libhdfs3.so", false)
.loadAndCreateLink("libre2.so.0", "libre2.so", false)
.loadAndCreateLink("libsodium.so.23", "libsodium.so", false)
.commit()
loader.loadAndCreateLink("libboost_atomic.so.1.84.0", "libboost_atomic.so", false)
loader.loadAndCreateLink("libboost_thread.so.1.84.0", "libboost_thread.so", false)
loader.loadAndCreateLink("libboost_system.so.1.84.0", "libboost_system.so", false)
loader.loadAndCreateLink("libicudata.so.60", "libicudata.so", false)
loader.loadAndCreateLink("libicuuc.so.60", "libicuuc.so", false)
loader.loadAndCreateLink("libicui18n.so.60", "libicui18n.so", false)
loader.loadAndCreateLink("libboost_regex.so.1.84.0", "libboost_regex.so", false)
loader.loadAndCreateLink(
"libboost_program_options.so.1.84.0",
"libboost_program_options.so",
false)
loader.loadAndCreateLink("libboost_filesystem.so.1.84.0", "libboost_filesystem.so", false)
loader.loadAndCreateLink("libboost_context.so.1.84.0", "libboost_context.so", false)
loader.loadAndCreateLink("libdouble-conversion.so.3", "libdouble-conversion.so", false)
loader.loadAndCreateLink("libevent-2.1.so.6", "libevent-2.1.so", false)
loader.loadAndCreateLink("libgflags.so.2.2", "libgflags.so", false)
loader.loadAndCreateLink("libglog.so.1", "libglog.so", false)
loader.loadAndCreateLink("libdwarf.so.1", "libdwarf.so", false)
loader.loadAndCreateLink("libidn.so.11", "libidn.so", false)
loader.loadAndCreateLink("libntlm.so.0", "libntlm.so", false)
loader.loadAndCreateLink("libgsasl.so.7", "libgsasl.so", false)
loader.loadAndCreateLink("libprotobuf.so.32", "libprotobuf.so", false)
loader.loadAndCreateLink("libhdfs3.so.1", "libhdfs3.so", false)
loader.loadAndCreateLink("libre2.so.0", "libre2.so", false)
loader.loadAndCreateLink("libsodium.so.23", "libsodium.so", false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@ import org.apache.gluten.vectorized.JniLibLoader

class SharedLibraryLoaderCentos9 extends SharedLibraryLoader {
override def loadLib(loader: JniLibLoader): Unit = {
loader
.newTransaction()
.loadAndCreateLink("libboost_atomic.so.1.84.0", "libboost_atomic.so", false)
.loadAndCreateLink("libboost_thread.so.1.84.0", "libboost_thread.so", false)
.loadAndCreateLink("libboost_system.so.1.84.0", "libboost_system.so", false)
.loadAndCreateLink("libicudata.so.67", "libicudata.so", false)
.loadAndCreateLink("libicuuc.so.67", "libicuuc.so", false)
.loadAndCreateLink("libicui18n.so.67", "libicui18n.so", false)
.loadAndCreateLink("libboost_regex.so.1.84.0", "libboost_regex.so", false)
.loadAndCreateLink("libboost_program_options.so.1.84.0", "libboost_program_options.so", false)
.loadAndCreateLink("libboost_filesystem.so.1.84.0", "libboost_filesystem.so", false)
.loadAndCreateLink("libboost_context.so.1.84.0", "libboost_context.so", false)
.loadAndCreateLink("libdouble-conversion.so.3", "libdouble-conversion.so", false)
.loadAndCreateLink("libevent-2.1.so.7", "libevent-2.1.so", false)
.loadAndCreateLink("libgflags.so.2.2", "libgflags.so", false)
.loadAndCreateLink("libglog.so.1", "libglog.so", false)
.loadAndCreateLink("libdwarf.so.0", "libdwarf.so", false)
.loadAndCreateLink("libidn.so.12", "libidn.so", false)
.loadAndCreateLink("libntlm.so.0", "libntlm.so", false)
.loadAndCreateLink("libgsasl.so.7", "libgsasl.so", false)
.loadAndCreateLink("libprotobuf.so.32", "libprotobuf.so", false)
.loadAndCreateLink("libhdfs3.so.1", "libhdfs3.so", false)
.loadAndCreateLink("libre2.so.9", "libre2.so", false)
.loadAndCreateLink("libsodium.so.23", "libsodium.so", false)
.commit()
loader.loadAndCreateLink("libboost_atomic.so.1.84.0", "libboost_atomic.so", false)
loader.loadAndCreateLink("libboost_thread.so.1.84.0", "libboost_thread.so", false)
loader.loadAndCreateLink("libboost_system.so.1.84.0", "libboost_system.so", false)
loader.loadAndCreateLink("libicudata.so.67", "libicudata.so", false)
loader.loadAndCreateLink("libicuuc.so.67", "libicuuc.so", false)
loader.loadAndCreateLink("libicui18n.so.67", "libicui18n.so", false)
loader.loadAndCreateLink("libboost_regex.so.1.84.0", "libboost_regex.so", false)
loader.loadAndCreateLink(
"libboost_program_options.so.1.84.0",
"libboost_program_options.so",
false)
loader.loadAndCreateLink("libboost_filesystem.so.1.84.0", "libboost_filesystem.so", false)
loader.loadAndCreateLink("libboost_context.so.1.84.0", "libboost_context.so", false)
loader.loadAndCreateLink("libdouble-conversion.so.3", "libdouble-conversion.so", false)
loader.loadAndCreateLink("libevent-2.1.so.7", "libevent-2.1.so", false)
loader.loadAndCreateLink("libgflags.so.2.2", "libgflags.so", false)
loader.loadAndCreateLink("libglog.so.1", "libglog.so", false)
loader.loadAndCreateLink("libdwarf.so.0", "libdwarf.so", false)
loader.loadAndCreateLink("libidn.so.12", "libidn.so", false)
loader.loadAndCreateLink("libntlm.so.0", "libntlm.so", false)
loader.loadAndCreateLink("libgsasl.so.7", "libgsasl.so", false)
loader.loadAndCreateLink("libprotobuf.so.32", "libprotobuf.so", false)
loader.loadAndCreateLink("libhdfs3.so.1", "libhdfs3.so", false)
loader.loadAndCreateLink("libre2.so.9", "libre2.so", false)
loader.loadAndCreateLink("libsodium.so.23", "libsodium.so", false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,30 @@ import org.apache.gluten.vectorized.JniLibLoader

class SharedLibraryLoaderDebian11 extends SharedLibraryLoader {
override def loadLib(loader: JniLibLoader): Unit = {
loader
.newTransaction()
.loadAndCreateLink("libicudata.so.67", "libicudata.so", false)
.loadAndCreateLink("libre2.so.9", "libre2.so", false)
.loadAndCreateLink("libicuuc.so.67", "libicuuc.so", false)
.loadAndCreateLink("liblber-2.4.so.2", "liblber-2.4.so", false)
.loadAndCreateLink("libsasl2.so.2", "libsasl2.so", false)
.loadAndCreateLink("libbrotlicommon.so.1", "libbrotlicommon.so", false)
.loadAndCreateLink("libicui18n.so.67", "libicui18n.so", false)
.loadAndCreateLink("libunwind.so.8", "libunwind.so", false)
.loadAndCreateLink("libgflags.so.2.2", "libgflags.so", false)
.loadAndCreateLink("libnghttp2.so.14", "libnghttp2.so", false)
.loadAndCreateLink("librtmp.so.1", "librtmp.so", false)
.loadAndCreateLink("libssh2.so.1", "libssh2.so", false)
.loadAndCreateLink("libpsl.so.5", "libpsl.so", false)
.loadAndCreateLink("libldap_r-2.4.so.2", "libldap_r-2.4.so", false)
.loadAndCreateLink("libbrotlidec.so.1", "libbrotlidec.so", false)
.loadAndCreateLink("libthrift-0.13.0.so", "libthrift.so", false)
.loadAndCreateLink("libboost_context.so.1.84.0", "libboost_context.so", false)
.loadAndCreateLink("libboost_regex.so.1.84.0", "libboost_regex.so", false)
.loadAndCreateLink("libdouble-conversion.so.3", "libdouble-conversion.so", false)
.loadAndCreateLink("libglog.so.0", "libglog.so", false)
.loadAndCreateLink("libevent-2.1.so.7", "libevent-2.1.so", false)
.loadAndCreateLink("libsnappy.so.1", "libsnappy.so", false)
.loadAndCreateLink("libcurl.so.4", "libcurl.so", false)
.loadAndCreateLink("libprotobuf.so.32", "libprotobuf.so", false)
.loadAndCreateLink("libhdfs3.so.1", "libhdfs3.so", false)
.commit()
loader.loadAndCreateLink("libicudata.so.67", "libicudata.so", false)
loader.loadAndCreateLink("libre2.so.9", "libre2.so", false)
loader.loadAndCreateLink("libicuuc.so.67", "libicuuc.so", false)
loader.loadAndCreateLink("liblber-2.4.so.2", "liblber-2.4.so", false)
loader.loadAndCreateLink("libsasl2.so.2", "libsasl2.so", false)
loader.loadAndCreateLink("libbrotlicommon.so.1", "libbrotlicommon.so", false)
loader.loadAndCreateLink("libicui18n.so.67", "libicui18n.so", false)
loader.loadAndCreateLink("libunwind.so.8", "libunwind.so", false)
loader.loadAndCreateLink("libgflags.so.2.2", "libgflags.so", false)
loader.loadAndCreateLink("libnghttp2.so.14", "libnghttp2.so", false)
loader.loadAndCreateLink("librtmp.so.1", "librtmp.so", false)
loader.loadAndCreateLink("libssh2.so.1", "libssh2.so", false)
loader.loadAndCreateLink("libpsl.so.5", "libpsl.so", false)
loader.loadAndCreateLink("libldap_r-2.4.so.2", "libldap_r-2.4.so", false)
loader.loadAndCreateLink("libbrotlidec.so.1", "libbrotlidec.so", false)
loader.loadAndCreateLink("libthrift-0.13.0.so", "libthrift.so", false)
loader.loadAndCreateLink("libboost_context.so.1.84.0", "libboost_context.so", false)
loader.loadAndCreateLink("libboost_regex.so.1.84.0", "libboost_regex.so", false)
loader.loadAndCreateLink("libdouble-conversion.so.3", "libdouble-conversion.so", false)
loader.loadAndCreateLink("libglog.so.0", "libglog.so", false)
loader.loadAndCreateLink("libevent-2.1.so.7", "libevent-2.1.so", false)
loader.loadAndCreateLink("libsnappy.so.1", "libsnappy.so", false)
loader.loadAndCreateLink("libcurl.so.4", "libcurl.so", false)
loader.loadAndCreateLink("libprotobuf.so.32", "libprotobuf.so", false)
loader.loadAndCreateLink("libhdfs3.so.1", "libhdfs3.so", false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,36 @@ import org.apache.gluten.vectorized.JniLibLoader

class SharedLibraryLoaderDebian12 extends SharedLibraryLoader {
override def loadLib(loader: JniLibLoader): Unit = {
loader
.newTransaction()
.loadAndCreateLink("libcrypto.so.3", "libcrypto.so", false)
.loadAndCreateLink("libkrb5support.so.0", "libkrb5support.so", false)
.loadAndCreateLink("libssl.so.3", "libssl.so", false)
.loadAndCreateLink("libicudata.so.72", "libicudata.so", false)
.loadAndCreateLink("libk5crypto.so.3", "libk5crypto.so", false)
.loadAndCreateLink("libkeyutils.so.1", "libkeyutils.so", false)
.loadAndCreateLink("libsnappy.so.1", "libsnappy.so", false)
.loadAndCreateLink("libthrift-0.17.0.so", "libthrift.so", false)
.loadAndCreateLink("libicuuc.so.72", "libicuuc.so", false)
.loadAndCreateLink("libkrb5.so.3", "libkrb5.so", false)
.loadAndCreateLink("liblber-2.5.so.0", "liblber-2.4.so", false)
.loadAndCreateLink("libsasl2.so.2", "libsasl2.so", false)
.loadAndCreateLink("libbrotlicommon.so.1", "libbrotlicommon.so", false)
.loadAndCreateLink("libicui18n.so.72", "libicui18n.so", false)
.loadAndCreateLink("libgflags.so.2.2", "libgflags.so", false)
.loadAndCreateLink("libunwind.so.8", "libunwind.so", false)
.loadAndCreateLink("libnghttp2.so.14", "libnghttp2.so", false)
.loadAndCreateLink("librtmp.so.1", "librtmp.so", false)
.loadAndCreateLink("libssh2.so.1", "libssh2.so", false)
.loadAndCreateLink("libpsl.so.5", "libpsl.so", false)
.loadAndCreateLink("libgssapi_krb5.so.2", "libgssapi_krb5.so", false)
.loadAndCreateLink("libldap-2.5.so.0", "libldap_r-2.4.so", false)
.loadAndCreateLink("libbrotlidec.so.1", "libbrotlidec.so", false)
.loadAndCreateLink("libboost_context.so.1.84.0", "libboost_context.so", false)
.loadAndCreateLink("libboost_regex.so.1.84.0", "libboost_regex.so", false)
.loadAndCreateLink("libdouble-conversion.so.3", "libdouble-conversion.so", false)
.loadAndCreateLink("libglog.so.1", "libglog.so", false)
.loadAndCreateLink("libevent-2.1.so.7", "libevent-2.1.so", false)
.loadAndCreateLink("libcurl.so.4", "libcurl.so", false)
.loadAndCreateLink("libprotobuf.so.32", "libprotobuf.so", false)
.loadAndCreateLink("libhdfs3.so.1", "libhdfs3.so", false)
.commit()
loader.loadAndCreateLink("libcrypto.so.3", "libcrypto.so", false)
loader.loadAndCreateLink("libkrb5support.so.0", "libkrb5support.so", false)
loader.loadAndCreateLink("libssl.so.3", "libssl.so", false)
loader.loadAndCreateLink("libicudata.so.72", "libicudata.so", false)
loader.loadAndCreateLink("libk5crypto.so.3", "libk5crypto.so", false)
loader.loadAndCreateLink("libkeyutils.so.1", "libkeyutils.so", false)
loader.loadAndCreateLink("libsnappy.so.1", "libsnappy.so", false)
loader.loadAndCreateLink("libthrift-0.17.0.so", "libthrift.so", false)
loader.loadAndCreateLink("libicuuc.so.72", "libicuuc.so", false)
loader.loadAndCreateLink("libkrb5.so.3", "libkrb5.so", false)
loader.loadAndCreateLink("liblber-2.5.so.0", "liblber-2.4.so", false)
loader.loadAndCreateLink("libsasl2.so.2", "libsasl2.so", false)
loader.loadAndCreateLink("libbrotlicommon.so.1", "libbrotlicommon.so", false)
loader.loadAndCreateLink("libicui18n.so.72", "libicui18n.so", false)
loader.loadAndCreateLink("libgflags.so.2.2", "libgflags.so", false)
loader.loadAndCreateLink("libunwind.so.8", "libunwind.so", false)
loader.loadAndCreateLink("libnghttp2.so.14", "libnghttp2.so", false)
loader.loadAndCreateLink("librtmp.so.1", "librtmp.so", false)
loader.loadAndCreateLink("libssh2.so.1", "libssh2.so", false)
loader.loadAndCreateLink("libpsl.so.5", "libpsl.so", false)
loader.loadAndCreateLink("libgssapi_krb5.so.2", "libgssapi_krb5.so", false)
loader.loadAndCreateLink("libldap-2.5.so.0", "libldap_r-2.4.so", false)
loader.loadAndCreateLink("libbrotlidec.so.1", "libbrotlidec.so", false)
loader.loadAndCreateLink("libboost_context.so.1.84.0", "libboost_context.so", false)
loader.loadAndCreateLink("libboost_regex.so.1.84.0", "libboost_regex.so", false)
loader.loadAndCreateLink("libdouble-conversion.so.3", "libdouble-conversion.so", false)
loader.loadAndCreateLink("libglog.so.1", "libglog.so", false)
loader.loadAndCreateLink("libevent-2.1.so.7", "libevent-2.1.so", false)
loader.loadAndCreateLink("libcurl.so.4", "libcurl.so", false)
loader.loadAndCreateLink("libprotobuf.so.32", "libprotobuf.so", false)
loader.loadAndCreateLink("libhdfs3.so.1", "libhdfs3.so", false)
}
}
Loading
Loading