From 5b739eb9879f6e7c49499732d2111073ca23bf5e Mon Sep 17 00:00:00 2001 From: ZiChen Qian Date: Tue, 7 Sep 2021 22:49:04 +0800 Subject: [PATCH] [SR-4389] make STARROCKS_HOME compatible with DORIS_HOME in configuration and startup be/fe. (#27) make STARROCKS_HOME compatible with DORIS_HOME, since the configuration can not be changed on user side. --- bin/start_be.sh | 2 ++ bin/start_fe.sh | 3 +++ bin/stop_be.sh | 2 ++ bin/stop_fe.sh | 2 ++ 4 files changed, 9 insertions(+) diff --git a/bin/start_be.sh b/bin/start_be.sh index 086d411c5f855..188d6a6630264 100755 --- a/bin/start_be.sh +++ b/bin/start_be.sh @@ -37,6 +37,8 @@ while true; do done export STARROCKS_HOME=`cd "$curdir/.."; pwd` +# compatible with DORIS_HOME: DORIS_HOME still be using in config on the user side, so set DORIS_HOME to the meaningful value in case of wrong envs. +export DORIS_HOME="$STARROCKS_HOME" source $STARROCKS_HOME/bin/common.sh # export env variables from be.conf diff --git a/bin/start_fe.sh b/bin/start_fe.sh index 42037b4d56f26..68d4fa91b5523 100755 --- a/bin/start_fe.sh +++ b/bin/start_fe.sh @@ -41,6 +41,9 @@ done export STARROCKS_HOME=`cd "$curdir/.."; pwd` +# compatible with DORIS_HOME: DORIS_HOME still be using in config on the user side, so set DORIS_HOME to the meaningful value in case of wrong envs. +export DORIS_HOME="$STARROCKS_HOME" + source $STARROCKS_HOME/bin/common.sh # export env variables from fe.conf diff --git a/bin/stop_be.sh b/bin/stop_be.sh index f9b021c28a80a..fa9769f834493 100755 --- a/bin/stop_be.sh +++ b/bin/stop_be.sh @@ -20,6 +20,8 @@ curdir=`dirname "$0"` curdir=`cd "$curdir"; pwd` export STARROCKS_HOME=`cd "$curdir/.."; pwd` +# compatible with DORIS_HOME: DORIS_HOME still be using in config on the user side, so set DORIS_HOME to the meaningful value in case of wrong envs. +export DORIS_HOME="$STARROCKS_HOME" export PID_DIR=`cd "$curdir"; pwd` source $STARROCKS_HOME/bin/common.sh diff --git a/bin/stop_fe.sh b/bin/stop_fe.sh index 327baa78e9906..f51bbe8f738b0 100755 --- a/bin/stop_fe.sh +++ b/bin/stop_fe.sh @@ -20,6 +20,8 @@ curdir=`dirname "$0"` curdir=`cd "$curdir"; pwd` export STARROCKS_HOME=`cd "$curdir/.."; pwd` +# compatible with DORIS_HOME: DORIS_HOME still be using in config on the user side, so set DORIS_HOME to the meaningful value in case of wrong envs. +export DORIS_HOME="$STARROCKS_HOME" export PID_DIR=`cd "$curdir"; pwd` source $STARROCKS_HOME/bin/common.sh