Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIGTOP-3921: Add ZSTD Codec Support for hadoop #1095

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bigtop-packages/src/common/hadoop/do-component-build
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ if [ -z "$BUNDLE_SNAPPY" ] ; then
[ -f /usr/lib/${HOSTTYPE}-linux-gnu/libsnappy.so ] && BUNDLE_SNAPPY="-Dsnappy.prefix=x -Dbundle.snappy=true -Dsnappy.lib=/usr/lib/${HOSTTYPE}-linux-gnu"
fi

if [ -z "$BUNDLE_ZSTD" ] ; then
[ -f /usr/lib/libzstd.so ] && BUNDLE_ZSTD="-Dbundle.zstd=true -Dzstd.lib=/usr/lib"
[ -f /usr/lib64/libzstd.so ] && BUNDLE_ZSTD="-Dbundle.zstd=true -Dzstd.lib=/usr/lib64"
[ -f /usr/lib/${HOSTTYPE}-linux-gnu/libzstd.so ] && BUNDLE_ZSTD="-Dbundle.zstd=true -Dzstd.lib=/usr/lib/${HOSTTYPE}-linux-gnu"
Comment on lines +124 to +126
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we expect all supported distro/platform have libzstd.so? We can add package dependency on libzstd to make it certain that the required library is installed to runtime environment if so.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emmm, I only have CentOS 7.4 at hand.
Can someone help to verify other distros/platforms?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emmm, I only have CentOS 7.4 at hand. Can someone help to verify other distros/platforms?

Assume your development environment is x86 64/amd64-based.
Please try to test it in various Distros of Bigtop docker images for x86 64/amd64 first.
(https://hub.docker.com/r/bigtop/slaves/tags)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll paste the result later, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With bigtop docker images for x86_64, got following result:

  1. centos-7

image

image

2. debian-11

image

image

3. ubuntu-22.04

image

image

4. fedora-36

image

image

5. rockylinux-8

image

image

fi

mkdir build
mkdir build/src

Expand All @@ -132,7 +138,7 @@ MAVEN_OPTS+="-DskipTests -DskipITs "
. $(dirname ${0})/maven_deploy.sh

# Build artifacts
mvn $BUNDLE_SNAPPY -Pdist -Pnative -Psrc -Pyarn-ui -Dtar ${MAVEN_OPTS} install ${EXTRA_GOALS} "$@"
mvn $BUNDLE_SNAPPY $BUNDLE_ZSTD -Pdist -Pnative -Psrc -Pyarn-ui -Dtar ${MAVEN_OPTS} install ${EXTRA_GOALS} "$@"
mvn site site:stage ${MAVEN_OPTS} $@

(cd build ; tar --strip-components=1 -xzvf ../hadoop-dist/target/hadoop-${HADOOP_VERSION}.tar.gz)
Expand Down