This is an automated email from the ASF dual-hosted git repository.
lidongdai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new e00a58249b [Fix][Zeta] Preserve job name containing spaces in
seatunnel.sh (#10483)
e00a58249b is described below
commit e00a58249b16b5666b89e828a1e4af0752d9df40
Author: corgy-w <[email protected]>
AuthorDate: Wed Feb 11 21:58:55 2026 +0800
[Fix][Zeta] Preserve job name containing spaces in seatunnel.sh (#10483)
---
seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh
b/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh
index f8337c8b82..7af0c149eb 100755
--- a/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh
+++ b/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh
@@ -44,12 +44,11 @@ if [ -f "${CONF_DIR}/seatunnel-env.sh" ]; then
. "${CONF_DIR}/seatunnel-env.sh"
fi
-if [ $# == 0 ]
-then
- args="-h"
-else
- args=$@
+if [ $# == 0 ]; then
+ set -- -h
fi
+args=("$@")
+args_str=" $* "
set +u
# SeaTunnel Engine Config
@@ -84,7 +83,7 @@ JAVA_OPTS="${JAVA_OPTS}
-Dlog4j2.isThreadContextMapInheritable=true"
if [ -e "${CONF_DIR}/log4j2_client.properties" ]; then
JAVA_OPTS="${JAVA_OPTS} -Dhazelcast.logging.type=log4j2
-Dlog4j2.configurationFile=${CONF_DIR}/log4j2_client.properties"
JAVA_OPTS="${JAVA_OPTS} -Dseatunnel.logs.path=${APP_DIR}/logs"
- if [[ $args == *" -m local"* || $args == *" --master local"* || $args == *"
-e local"* || $args == *" --deploy-mode local"* ]]; then
+ if [[ "$args_str" == *" -m local "* || "$args_str" == *" --master local "*
|| "$args_str" == *" -e local "* || "$args_str" == *" --deploy-mode local "*
]]; then
ntime=$(echo `date "+%N"`|sed -r 's/^0+//')
JAVA_OPTS="${JAVA_OPTS}
-Dseatunnel.logs.file_name=seatunnel-starter-client-$((`date
'+%s'`*1000+$ntime/1000000))"
else
@@ -147,4 +146,4 @@ if [[ -n "$GC_LOG_PATH" ]]; then
fi
fi
-java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args}
+java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} "${args[@]}"