-
Notifications
You must be signed in to change notification settings - Fork 529
BIGTOP-3852: Java 11 to bigtop-toolchain to use it in docker container during packaging #1043
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
Conversation
- both 8 and 11 are installed 8 is used as default - add an option to pass the preferred java version to the build container - add an option to swich jdk to kafka's do-component-build
|
I chose the way that has small impact, I think there are other ways to tell the selection of JDK to the container (like |
iwasakims
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It worked on Ubuntu 18.04 aarch64 and CentOS 7 aarch64.
We can not yet use Java 11 for building all products. Tweaking Java version in do-component-build for specific product should be fine now. |
|
@yoda-mon |
Yes, I think so too. This way does not harm other projects.
I agree. The main JDK on Bigtop should be 8 because some project don't have compatibly for >8. |
- Add an order to jdk11 -> jdk8 - Set java 8 as default explicitly using update-java-alternatives or update-alternatives
|
I added several procedures to ensure to use java 8, not java 11.
Here shows the script for a checking. OS_LIST=(centos-7 rockylinux-8 fedora-35 fedora-36 debian-10 debian-11 ubuntu-18.04 ubuntu-20.04 ubuntu-22.04)
for OS in "${OS_LIST[@]}"
do
echo $OS
docker run --rm -itd --name bigtop-test-${OS} bigtop/slaves:trunk-${OS}-aarch64 /bin/bash
docker exec -it bigtop-test-${OS} java -version
docker exec -it bigtop-test-${OS} javac -version
docker exec -it bigtop-test-${OS} bash -cl 'echo "$JAVA_HOME"'
docker stop bigtop-test-${OS}
echo ""
done
|
|
I modified to use |
iwasakims
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @yoda-mon. +1.
|
@yoda-mon @iwasakims @guyuqi |
|
@timyuer |
@yoda-mon |
In fact, using the |
I think Hadoop would be the blocker, wouldn't it ?
I think this is partially correct. If you build multi packages with
|
In the third point, using different jdk at the same time can be subdivided into the following two types,
|
|
This leads to the following discussion:
|
Description of PR
This PR aims bigtop users can use Java 11 when they package some projects on a docker container.
JAVA_HOMEto change the Java version.How was this patch tested?
Installation of JDK 11
I checked below on aarch 64 machine
The default JAVA_HOME is set to 8 by
/etc/profile.d/bigtop.shso installation does not affect on it.Build Kafka 2.8.1 by Java 11
I checked below on aarch 64 machine.
I checked Java version by inserting
mvn --versionorgradle --versiontodo-component-build.Zookeeper was build by 8 and Kafka was by 11.
For code changes: