You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2024/09/06 06:43:32 UTC

(kylin) branch kylin5 updated: KYLIN-5971 Optimize bootstrap process when prepare gluten

This is an automated email from the ASF dual-hosted git repository.

liyang pushed a commit to branch kylin5
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/kylin5 by this push:
     new 4ace13c5a9 KYLIN-5971 Optimize bootstrap process when prepare gluten
4ace13c5a9 is described below

commit 4ace13c5a9819d8916f6e93839d2e189ab57b642
Author: zhong.zhu <mi...@icloud.com>
AuthorDate: Fri Sep 6 10:28:17 2024 +0800

    KYLIN-5971 Optimize bootstrap process when prepare gluten
---
 build/release/compress.sh        | 13 -------------
 build/release/download-gluten.sh |  2 +-
 build/sbin/bootstrap.sh          |  7 +++++++
 3 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/build/release/compress.sh b/build/release/compress.sh
index f20e4deab9..6a57f53660 100755
--- a/build/release/compress.sh
+++ b/build/release/compress.sh
@@ -101,19 +101,6 @@ if [[ "${WITH_GLUTEN}" = "1" ]]; then
     cp -rf gluten/jars/spark33/* ${package_name}/lib/gluten/
     mv spark/libch.so ${package_name}/server/
     cp spark/jars/gluten.jar ${package_name}/lib/ext/
-    if [[ "$(uname)" == "Darwin" ]]; then
-            sed -i '' '27a\
-    export LD_PRELOAD=${KYLIN_HOME}/server/libch.so
-    ' ${package_name}/sbin/bootstrap.sh
-        else
-            sed -i '27aexport LD_PRELOAD=${KYLIN_HOME}/server/libch.so' ${package_name}/sbin/bootstrap.sh
-        fi
-    else
-        if [[ "$(uname)" == "Darwin" ]]; then
-            sed -i '' '/^export LD_PRELOAD=/d' ${package_name}/sbin/bootstrap.sh
-        else
-            sed -i '/^export LD_PRELOAD=/d' ${package_name}/sbin/bootstrap.sh
-        fi
 fi
 
 # cp -rf deploy/.keystore ${package_name}/server/
diff --git a/build/release/download-gluten.sh b/build/release/download-gluten.sh
index d3e708799f..14523ca220 100755
--- a/build/release/download-gluten.sh
+++ b/build/release/download-gluten.sh
@@ -29,7 +29,7 @@ gluten_version=$(sed -n 's:.*<gluten.version>\(.*\)</gluten.version>.*:\1:p'  po
 gluten_platform='ubuntu22.04-x86_64'
 if [ ! -f "build/gluten-${gluten_version}-${gluten_platform}.tar.gz" ]; then
   echo "no binary file found"
-  wget --directory-prefix=build/ https://repo-ofs.kyligence.com/repository/raw-tars-hosted/org/apache/gluten/${gluten_version}-${gluten_platform}/gluten-${gluten_version}-${gluten_platform}.tar.gz
+  wget --directory-prefix=build/ https://repository.kyligence.io/repository/open-raw/org/apache/gluten/${gluten_version}-${gluten_platform}/gluten-${gluten_version}-${gluten_platform}.tar.gz
 fi
 
 tar -zxf build/gluten-${gluten_version}-${gluten_platform}.tar.gz -C build/
diff --git a/build/sbin/bootstrap.sh b/build/sbin/bootstrap.sh
index 7b50399ec4..7db4cc2941 100755
--- a/build/sbin/bootstrap.sh
+++ b/build/sbin/bootstrap.sh
@@ -61,6 +61,13 @@ function prepareEnv() {
     source ${KYLIN_HOME}/sbin/init-kerberos.sh
     prepareKerberosOpts
     initKerberosIfNeeded
+
+    # init gluten libch.so
+    if [[ -f ${KYLIN_HOME}/server/libch.so ]]; then
+      export LD_PRELOAD=${KYLIN_HOME}/server/libch.so
+      verbose "LD_PRELOAD= is:${LD_PRELOAD}"
+    fi
+
 }
 
 function retrieveDependency() {