You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2022/07/28 16:02:00 UTC
[impala] 01/02: IMPALA-11439: Add option to control whether prepopulate m2 directory or not.
This is an automated email from the ASF dual-hosted git repository.
joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit bf4320e55d7e697098e36513e9c06d947d866b37
Author: yx91490 <yx...@126.com>
AuthorDate: Sat Jul 16 21:28:22 2022 +0800
IMPALA-11439: Add option to control whether prepopulate m2 directory or not.
The bootstrap_system.sh will prepopulate the .m2 directory by
downloading a 800M+ m2_archive.tar.gz to speed up the following maven
packaging process, although it's not necessary. Meanwhile, due to
different network environment, the download speed of the archive file
is not necessarily fast.
There add an environment variable 'PREPOPULATE_M2_REPOSITORY' to control
whether to prepopulate the m2 directory or not, which is true by
default.
Testing:
- manually run './bin/bootstrap_system.sh' and expect to see the log
'>>> Populating m2 directory...' and 'Downloading m2 archive from ...',
and the terminal returned for a while.
- manually run 'PREPOPULATE_M2_REPOSITORY=true ./bin/bootstrap_system.sh'
and expect to see the log '>>> Populating m2 directory...' and
'Downloading m2 archive from ...', and the terminal returned for a while.
- manually run 'PREPOPULATE_M2_REPOSITORY=false ./bin/bootstrap_system.sh'
and expect to see the log ">>> Skip populating m2 directory", and
the terminal returned immediately.
Change-Id: Ie3ac55099f326e2abe2f7dc66c08ad7023cb6baf
Reviewed-on: http://gerrit.cloudera.org:8080/18740
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Joe McDonnell <jo...@cloudera.com>
---
bin/bootstrap_system.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/bin/bootstrap_system.sh b/bin/bootstrap_system.sh
index 9231d324d..8c9fad68b 100755
--- a/bin/bootstrap_system.sh
+++ b/bin/bootstrap_system.sh
@@ -507,6 +507,11 @@ if [[ $ARCH_NAME == 'aarch64' ]]; then
fi
# Try to prepopulate the m2 directory to save time
-if ! bin/jenkins/populate_m2_directory.py ; then
- echo "Failed to prepopulate the m2 directory. Continuing..."
+if [[ "${PREPOPULATE_M2_REPOSITORY:-true}" == true ]] ; then
+ echo ">>> Populating m2 directory..."
+ if ! bin/jenkins/populate_m2_directory.py ; then
+ echo "Failed to prepopulate the m2 directory. Continuing..."
+ fi
+else
+ echo ">>> Skip populating m2 directory"
fi