Skip to content

HBASE-26645 Upgrade create-release to support both JDK8 and JDK11 - #3999

Closed
ndimiduk wants to merge 2 commits into
apache:masterfrom
ndimiduk:26645-create-release-jdk11
Closed

HBASE-26645 Upgrade create-release to support both JDK8 and JDK11#3999
ndimiduk wants to merge 2 commits into
apache:masterfrom
ndimiduk:26645-create-release-jdk11

Conversation

@ndimiduk

Copy link
Copy Markdown
Member

update create-release Dockerfile to use jdk11-headless

Requires #3974

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

Comment threaddev-support/create-release/hbase-rm/Dockerfile
@ndimiduk

Copy link
Copy Markdown
MemberAuthor

Canceling patch as this is blocked by a bug in javac. See the issue linked from JIRA.

@ndimidukndimiduk closed this Jan 4, 2022
@ndimiduk
ndimiduk deleted the 26645-create-release-jdk11 branch January 4, 2022 23:49
@ndimiduk
ndimiduk restored the 26645-create-release-jdk11 branch January 4, 2022 23:49
@ndimidukndimiduk reopened this Apr 1, 2022
@ndimiduk
ndimidukforce-pushed the 26645-create-release-jdk11 branch from 0d0f9bb to 4c592b3CompareApril 1, 2022 12:16
@ndimiduk

Copy link
Copy Markdown
MemberAuthor

@Apache9 's efforts on migrating our JDK8 dependencies out to hbase-thirdparty means that we can now use maven.compiler.release=8, which he also did. Bump the JDK version we use in our create-release automation. Mind taking another look?

@ndimiduk
ndimiduk requested review from joshelser and madrobApril 1, 2022 12:22
@ndimiduk

Copy link
Copy Markdown
MemberAuthor

Or maybe we cannot do this because these tools are used for creating releases from hbase-thirdparty. Is that the case?

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@Apache9

Copy link
Copy Markdown
Contributor

Or maybe we cannot do this because these tools are used for creating releases from hbase-thirdparty. Is that the case?

For hbase-thirdparty we still need to use JDK8. But anyway, we could install both in the docker file, and if it is for hbase we will use JDK11, for others we will use JDK8?

@ndimiduk
ndimidukforce-pushed the 26645-create-release-jdk11 branch from deb3a4c to 4e12010CompareApril 21, 2022 17:41
@ndimiduk

Copy link
Copy Markdown
MemberAuthor

Okay, this change just got complicated. Now we include both JDK versions in the docker file (the easy part) and support the user specifying which JDK they want used for the build (the annoyingly involved part).

And I pushed without doing enough testing. The new parsing code has some bugs. Will be back.

@ndimiduk
ndimidukforce-pushed the 26645-create-release-jdk11 branch from 4e12010 to 28ad068CompareApril 21, 2022 17:57
@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@Apache9

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/HBASE-25983

Seems we can not do release with JDK11 because we can not build the javadoc...

@ndimiduk

Copy link
Copy Markdown
MemberAuthor

https://issues.apache.org/jira/browse/HBASE-25983

Seems we can not do release with JDK11 because we can not build the javadoc...

I saw that. This PR can sit until we have more progress, or I can close it for now, if it's in the way. As you like.

@apurtell

Copy link
Copy Markdown
Contributor

We can leave it open I think, assuming HBASE-25983 is going to be fixed in the near term.

@ndimiduk
ndimidukforce-pushed the 26645-create-release-jdk11 branch from 28ad068 to aada0c0CompareNovember 9, 2022 16:38
@ndimidukndimiduk changed the title HBASE-26645 Upgrade create-release to use JDK11HBASE-26645 Upgrade create-release to support both JDK8 and JDK11Nov 9, 2022
add support for multiple jdk versions
Include both jdk8 and jdk11 in our docker image. Extend `do-release-docker.sh` to support
selecting a jdk version ; doing so required switching from the bash build-in `getopts` to the less
featureful command `getopt`, which supports parsing long command options.
@ndimiduk
ndimidukforce-pushed the 26645-create-release-jdk11 branch from aada0c0 to 9d4a07eCompareNovember 9, 2022 16:39
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 10sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗mvndep0m 4sMaven dependency ordering for patch
_ Other Tests _
2m 23s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#3999
Optional Tests
unameLinux b26e958212cd 5.4.0-1085-aws #92~18.04.1-Ubuntu SMP Wed Aug 31 17:21:08 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / b1a648f
Max. process+thread count33 (vs. ulimit of 30000)
modulesC: U:
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/3/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 10sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗mvndep0m 4sMaven dependency ordering for patch
_ Other Tests _
2m 26s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#3999
Optional Tests
unameLinux 3fe7dd093963 5.4.0-1085-aws #92~18.04.1-Ubuntu SMP Wed Aug 31 17:21:08 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / b1a648f
Max. process+thread count37 (vs. ulimit of 30000)
modulesC: U:
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/3/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 20sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗shelldocs0m 0sShelldocs was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for branch
+1 💚spotless0m 54sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗mvndep0m 6sMaven dependency ordering for patch
+1 💚hadolint0m 0sThere were no new hadolint issues.
+1 💚shellcheck0m 3sThere were no new shellcheck issues.
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚spotless1m 0spatch has no errors when running spotless:check.
_ Other Tests _
+0 🆗asflicense0m 0sASF License check generated no output?
4m 45s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#3999
Optional Testsdupname asflicense spotless shellcheck shelldocs hadolint
unameLinux cf342dc61aca 5.4.0-124-generic #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / b1a648f
Max. process+thread count44 (vs. ulimit of 30000)
modulesC: U:
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/3/console
versionsgit=2.34.1 maven=3.8.6 shellcheck=0.8.0 hadolint=Haskell Dockerfile Linter 2.10.0
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Ubuntu's update{-java}-alternatives requires sudo and globally modifies symlinks. The release
script expects to select a java version dynamically. Thus, use jenv to manage java selection.
@Apache9

Copy link
Copy Markdown
Contributor

For the upcoming 2.5.2 release where we plan to make both hadoop2 and hadoop3 artifacts, I do not think we can use java11 since it can not be used to build artifacts for hadoop2... Of course it is possible to build hadoop3 artifacts with java11, but anyway, we can not specify java11 only from the command line...

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 4sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗mvndep0m 5sMaven dependency ordering for patch
_ Other Tests _
2m 20s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/4/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#3999
Optional Tests
unameLinux bf2c00e33f6a 5.4.0-124-generic #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 260cd48
Max. process+thread count28 (vs. ulimit of 30000)
modulesC: U:
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/4/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 17sDocker mode activated.
-0 ⚠️yetus0m 4sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗mvndep0m 4sMaven dependency ordering for patch
_ Other Tests _
2m 35s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/4/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#3999
Optional Tests
unameLinux 988e48af49a5 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 260cd48
Max. process+thread count38 (vs. ulimit of 30000)
modulesC: U:
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/4/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 4sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗shelldocs0m 1sShelldocs was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 17sMaven dependency ordering for branch
+1 💚spotless1m 2sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗mvndep0m 6sMaven dependency ordering for patch
+1 💚hadolint0m 1sThere were no new hadolint issues.
+1 💚shellcheck0m 3sThere were no new shellcheck issues.
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚spotless0m 51spatch has no errors when running spotless:check.
_ Other Tests _
+0 🆗asflicense0m 0sASF License check generated no output?
4m 35s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/4/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#3999
Optional Testsdupname asflicense spotless shellcheck shelldocs hadolint
unameLinux fa405f6dd959 5.4.0-1088-aws #96~18.04.1-Ubuntu SMP Mon Oct 17 02:57:48 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 260cd48
Max. process+thread count43 (vs. ulimit of 30000)
modulesC: U:
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-3999/4/console
versionsgit=2.34.1 maven=3.8.6 shellcheck=0.8.0 hadolint=Haskell Dockerfile Linter 2.10.0
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ndimiduk

Copy link
Copy Markdown
MemberAuthor

For the upcoming 2.5.2 release where we plan to make both hadoop2 and hadoop3 artifacts, I do not think we can use java11 since it can not be used to build artifacts for hadoop2... Of course it is possible to build hadoop3 artifacts with java11, but anyway, we can not specify java11 only from the command line...

I think you're right. Doing this with create-release will be strange, the way it current considers a single jvm version as "all or nothing". It's also annoying because of how ubuntu manages multiple openjdk package installs... you can't just set JAVA_HOME to get a java version, the java binary appears to be pinned to it's install location. See my latest commit on this branch, where I start working with jenv to enable switching JVMs more dynamically.

How do you want to proceed for 2.5.2?

@ndimiduk

Copy link
Copy Markdown
MemberAuthor

Should we build two docker images, one with JDK8 and the other with JDK11 installed, have the script launch each build in the appropriate image? The alternative would be to invoke update-java-alternatives (with sudo) between the two builds within the same container image.

@Apache9

Copy link
Copy Markdown
Contributor

For the upcoming 2.5.2 release where we plan to make both hadoop2 and hadoop3 artifacts, I do not think we can use java11 since it can not be used to build artifacts for hadoop2... Of course it is possible to build hadoop3 artifacts with java11, but anyway, we can not specify java11 only from the command line...

I think you're right. Doing this with create-release will be strange, the way it current considers a single jvm version as "all or nothing". It's also annoying because of how ubuntu manages multiple openjdk package installs... you can't just set JAVA_HOME to get a java version, the java binary appears to be pinned to it's install location. See my latest commit on this branch, where I start working with jenv to enable switching JVMs more dynamically.

How do you want to proceed for 2.5.2?

Just use java8 this time. We still want to keep the java8 compatibility even for hadoop3 so this sohuld not be a problem for now.

And for multi jdks, I think we could follow what we have done in the pre commit docker image, just download Temurin(used to be called Adopt) OpenJDKs for both java8 and java11, add JAVA_HOME/bin to path, and switch JAVA_HOME if we want to use different jdks.

Maybe later, we could use java8 to build hadoop2 related artifacts, and use java11 to build hadoop3 related artifacts. And for the upcoming 3.x releases, since they only support hadoop3, I think we could make them java11 only.

Thanks.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@ndimiduk@Apache-HBase@Apache9@apurtell@joshelser@madrob