bigtop
bigtop copied to clipboard
BIGTOP-4056. Support Detect Python Path
Description of PR
According to the descussion on the email,we should add a python path detecting script for all bigtop componets.
How was this patch tested?
- build the bigtop-utils package
docker run --rm -v `pwd`:/ws --workdir /ws bigtop/slaves:trunk-centos-7 bash -l -c './gradlew allclean ; ./gradlew bigtop-utils'
- make repo
./gradlew repo
- test bigtop-utils package by docker-hadoop.sh
./docker-hadoop.sh -dcp -d -k 'bigtop-utils' -L -r file:///bigtop-home/output -c 1
- login a container, and install python3 package from default distro repo or from source
(1) install from default repo
yum install -y python3
(2) install from source
# install build dependencies
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel
yum install -y tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
# get python3 source code
wget https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tgz
tar xzvf Python-3.7.6.tgz
cd Python-3.7.6
./configure --prefix=/opt/python3
make && make install
- check the python3 path detecting
. /usr/lib/bigtop-utils/bigtop-detect-pythonpath
echo $PAYTHON3_PATH
For code changes:
- [x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'BIGTOP-3638. Your PR title ...')?
- [x] Make sure that newly added files do not have any licensing issues. When in doubt refer to https://www.apache.org/licenses/
test it on centos-7 and ubuntu-22.04