This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 169f7b1dfdc branch-3.0: [opt](docker) add a script flag to control
load data or not #51065 (#51082)
169f7b1dfdc is described below
commit 169f7b1dfdc8522e1fcc9cb5215d8e272fbd262a
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat May 24 11:06:18 2025 +0800
branch-3.0: [opt](docker) add a script flag to control load data or not
#51065 (#51082)
Cherry-picked from #51065
Co-authored-by: zgxme <[email protected]>
---
docker/thirdparties/docker-compose/hive/hadoop-hive.env.tpl | 3 +++
docker/thirdparties/docker-compose/hive/scripts/hive-metastore.sh | 8 ++++++++
docker/thirdparties/run-thirdparties-docker.sh | 7 +++++++
3 files changed, 18 insertions(+)
diff --git a/docker/thirdparties/docker-compose/hive/hadoop-hive.env.tpl
b/docker/thirdparties/docker-compose/hive/hadoop-hive.env.tpl
index 7db18ab998f..4a845a49430 100644
--- a/docker/thirdparties/docker-compose/hive/hadoop-hive.env.tpl
+++ b/docker/thirdparties/docker-compose/hive/hadoop-hive.env.tpl
@@ -53,3 +53,6 @@ YARN_CONF_yarn_timeline___service_hostname=historyserver
YARN_CONF_yarn_resourcemanager_address=resourcemanager:8032
YARN_CONF_yarn_resourcemanager_scheduler_address=resourcemanager:8030
YARN_CONF_yarn_resourcemanager_resource__tracker_address=resourcemanager:8031
+
+NEED_LOAD_DATA=${NEED_LOAD_DATA}
+
diff --git a/docker/thirdparties/docker-compose/hive/scripts/hive-metastore.sh
b/docker/thirdparties/docker-compose/hive/scripts/hive-metastore.sh
index 20c469a880d..094f685adf1 100755
--- a/docker/thirdparties/docker-compose/hive/scripts/hive-metastore.sh
+++ b/docker/thirdparties/docker-compose/hive/scripts/hive-metastore.sh
@@ -18,6 +18,7 @@
set -e -x
+
parallel=$(getconf _NPROCESSORS_ONLN)
AUX_LIB="/mnt/scripts/auxlib"
@@ -43,6 +44,13 @@ while ! $(nc -z localhost "${HMS_PORT:-9083}"); do
sleep 5s
done
+if [[ ${NEED_LOAD_DATA} = "0" ]]; then
+ rm -f "${lockfile1}"
+ echo "NEED_LOAD_DATA is 0, skip load data"
+ touch /mnt/SUCCESS
+ # Avoid container exit
+ tail -f /dev/null
+fi
# create tables for other cases
# new cases should use separate dir
hadoop fs -mkdir -p /user/doris/suites/
diff --git a/docker/thirdparties/run-thirdparties-docker.sh
b/docker/thirdparties/run-thirdparties-docker.sh
index d1f9402cc65..6888c0189d0 100755
--- a/docker/thirdparties/run-thirdparties-docker.sh
+++ b/docker/thirdparties/run-thirdparties-docker.sh
@@ -36,6 +36,7 @@ Usage: $0 <options>
-c mysql,hive3 start MySQL and Hive3
--stop stop the specified components
--reserve-ports reserve host ports by setting
'net.ipv4.ip_local_reserved_ports' to avoid port already bind error
+ --no-load-data do not load data into the components
All valid components:
mysql,pg,oracle,sqlserver,clickhouse,es,hive2,hive3,iceberg,hudi,trino,kafka,mariadb,db2,oceanbase,lakesoul,kerberos,ranger
@@ -48,6 +49,7 @@ COMPONENTS=$2
HELP=0
STOP=0
NEED_RESERVE_PORTS=0
+export NEED_LOAD_DATA=1
if ! OPTS="$(getopt \
-n "$0" \
@@ -55,6 +57,7 @@ if ! OPTS="$(getopt \
-l 'help' \
-l 'stop' \
-l 'reserve-ports' \
+ -l 'no-load-data' \
-o 'hc:' \
-- "$@")"; then
usage
@@ -88,6 +91,10 @@ else
NEED_RESERVE_PORTS=1
shift
;;
+ --no-load-data)
+ export NEED_LOAD_DATA=0
+ shift
+ ;;
--)
shift
break
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]