This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 7eddd980903 branch-4.1: [opt](cloud) Support multiple config files in
start.sh #63924 (#65162)
7eddd980903 is described below
commit 7eddd9809032a38dedc7b6516021650dc619fa87
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Jul 3 20:44:34 2026 +0800
branch-4.1: [opt](cloud) Support multiple config files in start.sh #63924
(#65162)
Cherry-picked from #63924
Co-authored-by: Gavin Chou <[email protected]>
---
cloud/script/start.sh | 41 ++++++++++++++++++++++++++++-------------
1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/cloud/script/start.sh b/cloud/script/start.sh
index 415d9ea3fb4..cdca27e07f4 100644
--- a/cloud/script/start.sh
+++ b/cloud/script/start.sh
@@ -58,22 +58,37 @@ custom_start="${DORIS_HOME}/bin/custom_start.sh"
if [[ -f "${custom_start}" ]]; then
source "${custom_start}"
fi
-enable_hdfs=${enable_hdfs:-1}
process_name="${process_name:-doris_cloud}"
-# export env variables from ${process_name}.conf
-# read from ${process_name}.conf
-while read -r line; do
- envline="$(echo "${line}" |
- sed 's/[[:blank:]]*=[[:blank:]]*/=/g' |
- sed 's/^[[:blank:]]*//g' |
- grep -E "^[[:upper:]]([[:upper:]]|_|[[:digit:]])*=" ||
- true)"
- envline="$(eval "echo ${envline}")"
- if [[ "${envline}" == *"="* ]]; then
- eval 'export "${envline}"'
+CONF_FILES="${CONF_FILES:-${process_name}.conf}"
+loaded_conf_env_keys=" "
+for conf_pattern in ${CONF_FILES//,/ }; do
+ if [[ "${conf_pattern}" != /* ]]; then
+ conf_pattern="${DORIS_HOME}/conf/${conf_pattern}"
fi
-done <"${DORIS_HOME}/conf/${process_name}.conf"
+ for conf_file in ${conf_pattern}; do
+ if [[ ! -f "${conf_file}" ]]; then
+ continue
+ fi
+ while read -r line; do
+ envline="$(echo "${line}" |
+ sed 's/[[:blank:]]*=[[:blank:]]*/=/g' |
+ sed 's/^[[:blank:]]*//g' |
+ grep -E "^[[:upper:]]([[:upper:]]|_|[[:digit:]])*=" ||
+ true)"
+ envline="$(eval "echo ${envline}")"
+ if [[ "${envline}" == *"="* ]]; then
+ key="${envline%%=*}"
+ if [[ "${loaded_conf_env_keys}" != *" ${key} "* ]] && [[ -v
${key} ]]; then
+ continue
+ fi
+ eval 'export "${envline}"'
+ loaded_conf_env_keys="${loaded_conf_env_keys}${key} "
+ fi
+ done <"${conf_file}"
+ done
+done
+enable_hdfs=${enable_hdfs:-1}
role=''
if [[ ${RUN_METASERVICE} -eq 0 ]] && [[ ${RUN_RECYCLYER} -eq 0 ]]; then
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]