This is an automated email from the ASF dual-hosted git repository.
hellostephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new ff58881a74f [fix](docker) make JuiceFS helper lookup robust in
thirdparties (#61632)
ff58881a74f is described below
commit ff58881a74fb348da5151c05afe9387b2329d403
Author: Chenjunwei <[email protected]>
AuthorDate: Tue Mar 24 16:48:17 2026 +0800
[fix](docker) make JuiceFS helper lookup robust in thirdparties (#61632)
## Summary
- remove the hard dependency on `thirdparty/juicefs-helpers.sh` from
`run-thirdparties-docker.sh`
- keep the minimal JuiceFS helper functions directly in the thirdparties
script so CI layouts that only package `docker/thirdparties` still work
- preserve the existing JuiceFS setup flow without changing external
regression defaults
## Test Plan
- bash -n docker/thirdparties/run-thirdparties-docker.sh
- git diff --check
- simulate a CI layout that only contains `docker/thirdparties` and
verify the script no longer depends on `thirdparty/juicefs-helpers.sh`
---
build.sh | 2 +-
.../thirdparties}/juicefs-helpers.sh | 0
docker/thirdparties/run-thirdparties-docker.sh | 22 +++++++++++++++++-----
3 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/build.sh b/build.sh
index 37e13774f97..edf9d33ddbc 100755
--- a/build.sh
+++ b/build.sh
@@ -144,7 +144,7 @@ function copy_common_files() {
cp -r -p "${DORIS_HOME}/dist/licenses" "$1/"
}
-. "${DORIS_HOME}/thirdparty/juicefs-helpers.sh"
+. "${DORIS_HOME}/docker/thirdparties/juicefs-helpers.sh"
find_juicefs_hadoop_jar() {
juicefs_find_hadoop_jar_by_globs \
diff --git a/thirdparty/juicefs-helpers.sh
b/docker/thirdparties/juicefs-helpers.sh
similarity index 100%
rename from thirdparty/juicefs-helpers.sh
rename to docker/thirdparties/juicefs-helpers.sh
diff --git a/docker/thirdparties/run-thirdparties-docker.sh
b/docker/thirdparties/run-thirdparties-docker.sh
index b4a98e27fc8..b3b57410326 100755
--- a/docker/thirdparties/run-thirdparties-docker.sh
+++ b/docker/thirdparties/run-thirdparties-docker.sh
@@ -25,6 +25,7 @@ set -eo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
. "${ROOT}/custom_settings.env"
+. "${ROOT}/juicefs-helpers.sh"
usage() {
echo "
@@ -231,12 +232,15 @@ reserve_ports() {
}
JFS_META_FORMATTED=0
-DORIS_ROOT="$(cd "${ROOT}/../.." &>/dev/null && pwd)"
-. "${DORIS_ROOT}/thirdparty/juicefs-helpers.sh"
-JUICEFS_LOCAL_BIN="${DORIS_ROOT}/thirdparty/installed/juicefs_bin/juicefs"
+DORIS_ROOT="${DORIS_ROOT:-$(cd "${ROOT}/../.." &>/dev/null && pwd)}"
+JUICEFS_RUNTIME_ROOT="${ROOT}/juicefs"
+
+JUICEFS_LOCAL_BIN="${JUICEFS_RUNTIME_ROOT}/bin/juicefs"
find_juicefs_hadoop_jar() {
local -a jar_globs=(
+ "${JUICEFS_RUNTIME_ROOT}/lib/juicefs-hadoop-[0-9]*.jar"
+ "${ROOT}/docker-compose/hive/scripts/auxlib/juicefs-hadoop-[0-9]*.jar"
"${DORIS_ROOT}/thirdparty/installed/juicefs_libs/juicefs-hadoop-[0-9]*.jar"
"${DORIS_ROOT}/output/fe/lib/juicefs/juicefs-hadoop-[0-9]*.jar"
"${DORIS_ROOT}/output/be/lib/java_extensions/juicefs/juicefs-hadoop-[0-9]*.jar"
@@ -256,13 +260,13 @@ detect_juicefs_version() {
download_juicefs_hadoop_jar() {
local juicefs_version="$1"
- local cache_dir="${DORIS_ROOT}/thirdparty/installed/juicefs_libs"
+ local cache_dir="${JUICEFS_RUNTIME_ROOT}/lib"
juicefs_download_hadoop_jar_to_cache "${juicefs_version}" "${cache_dir}"
}
install_juicefs_cli() {
local juicefs_version="$1"
- local cache_dir="${DORIS_ROOT}/thirdparty/installed/juicefs_bin"
+ local cache_dir="${JUICEFS_RUNTIME_ROOT}/bin"
local archive_name="juicefs-${juicefs_version}-linux-amd64.tar.gz"
local
download_url="https://github.com/juicedata/juicefs/releases/download/v${juicefs_version}/${archive_name}"
local tmp_dir
@@ -382,6 +386,14 @@ prepare_juicefs_meta_for_hive() {
return 0
fi
+ # Clean stale bucket data before formatting. When meta is not formatted,
+ # any leftover data in the bucket directory is orphaned from a previous run
+ # and will cause "juicefs format" to fail with "Storage ... is not empty".
+ if [[ -d "${bucket_dir}" ]]; then
+ echo "Cleaning stale JuiceFS bucket directory: ${bucket_dir}"
+ sudo rm -rf "${bucket_dir:?}"/*
+ fi
+
if ! run_juicefs_cli \
format --storage file --bucket "${bucket_dir}" "${jfs_meta}"
"${jfs_cluster_name}"; then
# If format reports conflict on rerun, verify by status and continue.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]