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

zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new e805c74aa [CELEBORN-360] Export necessary env in load-celeborn-env.sh 
(#1308)
e805c74aa is described below

commit e805c74aadb11c31962397183f45e58cba53d665
Author: Angerszhuuuu <[email protected]>
AuthorDate: Fri Mar 3 21:09:11 2023 +0800

    [CELEBORN-360] Export necessary env in load-celeborn-env.sh (#1308)
---
 bin/celeborn-ratis                                | 2 +-
 sbin/celeborn-daemon.sh                           | 2 +-
 sbin/{celeborn-config.sh => load-celeborn-env.sh} | 6 +++---
 sbin/restart-worker.sh                            | 2 +-
 sbin/start-all.sh                                 | 2 +-
 sbin/start-master.sh                              | 2 +-
 sbin/start-worker.sh                              | 2 +-
 sbin/stop-all.sh                                  | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/bin/celeborn-ratis b/bin/celeborn-ratis
index 269e76da5..77ead6ad5 100755
--- a/bin/celeborn-ratis
+++ b/bin/celeborn-ratis
@@ -93,6 +93,6 @@ if [ -z "${CELEBORN_HOME}" ]; then
   export CELEBORN_HOME="$(cd "`dirname "$0"`"/..; pwd)"
 fi
 
-. "${CELEBORN_HOME}/sbin/celeborn-config.sh"
+. "${CELEBORN_HOME}/sbin/load-celeborn-env.sh"
 
 main "$@"
diff --git a/sbin/celeborn-daemon.sh b/sbin/celeborn-daemon.sh
index 536de592c..94c2e6566 100755
--- a/sbin/celeborn-daemon.sh
+++ b/sbin/celeborn-daemon.sh
@@ -40,7 +40,7 @@ if [ -z "${CELEBORN_HOME}" ]; then
   export CELEBORN_HOME="$(cd "`dirname "$0"`"/..; pwd)"
 fi
 
-. "${CELEBORN_HOME}/sbin/celeborn-config.sh"
+. "${CELEBORN_HOME}/sbin/load-celeborn-env.sh"
 
 # get arguments
 
diff --git a/sbin/celeborn-config.sh b/sbin/load-celeborn-env.sh
similarity index 94%
rename from sbin/celeborn-config.sh
rename to sbin/load-celeborn-env.sh
index 6382fb166..df1001b3b 100755
--- a/sbin/celeborn-config.sh
+++ b/sbin/load-celeborn-env.sh
@@ -42,10 +42,10 @@ fi
 
 # Find the java binary
 if [ -n "${JAVA_HOME}" ]; then
-  JAVA="${JAVA_HOME}/bin/java"
+  export JAVA="${JAVA_HOME}/bin/java"
 else
   if [ "$(command -v java)" ]; then
-    JAVA="java"
+    export JAVA="java"
   else
     echo "JAVA_HOME is not set" >&2
     exit 1
@@ -66,6 +66,6 @@ else
 fi
 
 if [ "$CELEBORN_PID_DIR" = "" ]; then
-  CELEBORN_PID_DIR="${CELEBORN_HOME}/pids"
+  export CELEBORN_PID_DIR="${CELEBORN_HOME}/pids"
 fi
 
diff --git a/sbin/restart-worker.sh b/sbin/restart-worker.sh
index c8c45bced..b332509a5 100755
--- a/sbin/restart-worker.sh
+++ b/sbin/restart-worker.sh
@@ -22,7 +22,7 @@ if [ -z "${CELEBORN_HOME}" ]; then
   export CELEBORN_HOME="$(cd "`dirname "$0"`"/..; pwd)"
 fi
 
-. "${CELEBORN_HOME}/sbin/celeborn-config.sh"
+. "${CELEBORN_HOME}/sbin/load-celeborn-env.sh"
 
 if [ "$CELEBORN_WORKER_MEMORY" = "" ]; then
   CELEBORN_WORKER_MEMORY="1g"
diff --git a/sbin/start-all.sh b/sbin/start-all.sh
index a07471d33..d06170688 100755
--- a/sbin/start-all.sh
+++ b/sbin/start-all.sh
@@ -22,7 +22,7 @@ if [ -z "${CELEBORN_HOME}" ]; then
   export CELEBORN_HOME="$(cd "`dirname "$0"`"/..; pwd)"
 fi
 
-. "${CELEBORN_HOME}/sbin/celeborn-config.sh"
+. "${CELEBORN_HOME}/sbin/load-celeborn-env.sh"
 
 if [ -f "${CELEBORN_CONF_DIR}/hosts" ]; then
   HOST_LIST=$(awk '/\[/{prefix=$0; next} $1{print prefix,$0}' 
"${CELEBORN_CONF_DIR}/hosts")
diff --git a/sbin/start-master.sh b/sbin/start-master.sh
index 76e6e2c05..f05aee463 100755
--- a/sbin/start-master.sh
+++ b/sbin/start-master.sh
@@ -22,7 +22,7 @@ if [ -z "${CELEBORN_HOME}" ]; then
   export CELEBORN_HOME="$(cd "`dirname "$0"`"/..; pwd)"
 fi
 
-. "${CELEBORN_HOME}/sbin/celeborn-config.sh"
+. "${CELEBORN_HOME}/sbin/load-celeborn-env.sh"
 
 if [ "$CELEBORN_MASTER_MEMORY" = "" ]; then
   CELEBORN_MASTER_MEMORY="1g"
diff --git a/sbin/start-worker.sh b/sbin/start-worker.sh
index ea4c45810..ac00c2cd5 100755
--- a/sbin/start-worker.sh
+++ b/sbin/start-worker.sh
@@ -22,7 +22,7 @@ if [ -z "${CELEBORN_HOME}" ]; then
   export CELEBORN_HOME="$(cd "`dirname "$0"`"/..; pwd)"
 fi
 
-. "${CELEBORN_HOME}/sbin/celeborn-config.sh"
+. "${CELEBORN_HOME}/sbin/load-celeborn-env.sh"
 
 if [ "$CELEBORN_WORKER_MEMORY" = "" ]; then
   CELEBORN_WORKER_MEMORY="1g"
diff --git a/sbin/stop-all.sh b/sbin/stop-all.sh
index 2ceebb8ec..0e34abc76 100755
--- a/sbin/stop-all.sh
+++ b/sbin/stop-all.sh
@@ -22,7 +22,7 @@ if [ -z "${CELEBORN_HOME}" ]; then
   export CELEBORN_HOME="$(cd "`dirname "$0"`"/..; pwd)"
 fi
 
-. "${CELEBORN_HOME}/sbin/celeborn-config.sh"
+. "${CELEBORN_HOME}/sbin/load-celeborn-env.sh"
 
 if [ -f "${CELEBORN_CONF_DIR}/hosts" ]; then
   HOST_LIST=$(awk '/\[/{prefix=$0; next} $1{print prefix,$0}' 
"${CELEBORN_CONF_DIR}/hosts")

Reply via email to