Skip to content

Commit

Permalink
Fix alluxio dataload bug (#3418)
Browse files Browse the repository at this point in the history
Signed-off-by: ZhangXiaozheng <[email protected]>
  • Loading branch information
zhang-x-z committed Sep 4, 2023
1 parent b402b33 commit e68ae2e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion charts/fluid-dataloader/alluxio/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,26 @@ data:
fi
}
function needPreLoadMetadata() {
local alluxioVersion=$(alluxio version)
test "$(echo "$alluxioVersion 2.8.0" | tr " " "\n" | sort -rV | head -n 1)" == "$alluxioVersion"
}
function distributedLoad() {
local path=$1
local replica=$2
checkPathExistence "$path"
alluxio fs setReplication --max $replica -R $path
if [[ $needLoadMetadata == 'true' ]]; then
time alluxio fs distributedLoad -Dalluxio.user.file.metadata.sync.interval=0 --replication $replica $path
# For Alluxio above 2.8.0, distributedLoad with -Dalluxio.user.file.metadata.sync.interval=0 cannot load new added file.
# Related issue: https://github.com/Alluxio/alluxio/issues/17827
# Use ls with -Dalluxio.user.file.metadata.sync.interval=0 instead
if needPreLoadMetadata; then
time alluxio fs ls -Dalluxio.user.file.metadata.sync.interval=0 -R $path
time alluxio fs distributedLoad --replication $replica $path
else
time alluxio fs distributedLoad -Dalluxio.user.file.metadata.sync.interval=0 --replication $replica $path
fi
else
time alluxio fs distributedLoad --replication $replica $path
fi
Expand Down

0 comments on commit e68ae2e

Please sign in to comment.