bigtop icon indicating copy to clipboard operation
bigtop copied to clipboard

BIGTOP-4056. Support Detect Python Path

Open vivostar opened this issue 2 years ago • 1 comments

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?

  1. 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'
  1. make repo
./gradlew repo
  1. test bigtop-utils package by docker-hadoop.sh
./docker-hadoop.sh -dcp -d -k 'bigtop-utils' -L -r file:///bigtop-home/output -c 1
  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
  1. 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/

vivostar avatar Dec 26 '23 12:12 vivostar

test it on centos-7 and ubuntu-22.04

vivostar avatar Dec 26 '23 12:12 vivostar