Skip to content

HBASE-29545 [hbase-thirdparty] Remove usage of Unsafe.defineClass - #148

Merged
Apache9 merged 1 commit into
apache:masterfrom
richardantal:HBASE-29545
Mar 2, 2026
Merged

HBASE-29545 [hbase-thirdparty] Remove usage of Unsafe.defineClass#148
Apache9 merged 1 commit into
apache:masterfrom
richardantal:HBASE-29545

Conversation

@richardantal

Copy link
Copy Markdown
Contributor

No description provided.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec1m 52sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗spotbugs0m 0sspotbugs executables are not available.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-0 ⚠️test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall0m 57smaster passed
+1 💚compile0m 6smaster passed
+1 💚checkstyle0m 6smaster passed
+1 💚javadoc0m 6smaster passed
_ Patch Compile Tests _
+1 💚mvninstall0m 8sthe patch passed
+1 💚compile0m 6sthe patch passed
+1 💚javac0m 6sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
-1 ❌checkstyle0m 3s/results-checkstyle-hbase-unsafe.txthbase-unsafe: The patch generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)
+1 💚javadoc0m 5sthe patch passed
_ Other Tests _
+1 💚unit0m 6shbase-unsafe in the patch passed.
+1 💚asflicense0m 6sThe patch does not generate ASF License warnings.
3m 54s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-Thirdparty-PreCommit/job/PR-148/1/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR#148
Optional Testsdupname asflicense javac javadoc unit spotbugs checkstyle codespell detsecrets compile
unameLinux 840e778eae74 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-home/workspace/Base-Thirdparty-PreCommit_PR-148/yetus-precommit-check/src/.yetus/personality.sh
git revisionmaster / a267a9c
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-Thirdparty-PreCommit/job/PR-148/1/testReport/
Max. process+thread count63 (vs. ulimit of 2000)
modulesC: hbase-unsafe U: hbase-unsafe
Console outputhttps://ci-hbase.apache.org/job/HBase-Thirdparty-PreCommit/job/PR-148/1/console
versionsgit=2.34.1 maven=called
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec2m 7sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗spotbugs0m 0sspotbugs executables are not available.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-0 ⚠️test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall0m 53smaster passed
+1 💚compile0m 7smaster passed
+1 💚checkstyle0m 6smaster passed
+1 💚javadoc0m 6smaster passed
_ Patch Compile Tests _
+1 💚mvninstall0m 6sthe patch passed
+1 💚compile0m 5sthe patch passed
+1 💚javac0m 5sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 3sthe patch passed
+1 💚javadoc0m 5sthe patch passed
_ Other Tests _
+1 💚unit0m 7shbase-unsafe in the patch passed.
+1 💚asflicense0m 6sThe patch does not generate ASF License warnings.
4m 2s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-Thirdparty-PreCommit/job/PR-148/2/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR#148
Optional Testsdupname asflicense javac javadoc unit spotbugs checkstyle codespell detsecrets compile
unameLinux a31e7ab6796d 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-home/workspace/Base-Thirdparty-PreCommit_PR-148/yetus-precommit-check/src/.yetus/personality.sh
git revisionmaster / dd15db2
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-Thirdparty-PreCommit/job/PR-148/2/testReport/
Max. process+thread count67 (vs. ulimit of 2000)
modulesC: hbase-unsafe U: hbase-unsafe
Console outputhttps://ci-hbase.apache.org/job/HBase-Thirdparty-PreCommit/job/PR-148/2/console
versionsgit=2.34.1 maven=called
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@richardantal

Copy link
Copy Markdown
ContributorAuthor

@stoty , @Apache9
I searched for usages in and did not find any place where it was used.
Can we remove these functions?

@richardantal

richardantal commented Aug 26, 2025

Copy link
Copy Markdown
ContributorAuthor

It would help if we want to build hbase-thirdparty with only java 17

@richardantal

Copy link
Copy Markdown
ContributorAuthor

should we adapt these functions to use java.lang.invoke.MethodHandles.Lookup.defineClass instead?

@stoty

Copy link
Copy Markdown
Contributor

should we adapt these functions to use java.lang.invoke.MethodHandles.Lookup.defineClass instead?

That would alleviate concerns about removing methods in a patch release.

@richardantal

Copy link
Copy Markdown
ContributorAuthor

The problem is that Lookup.defineClass is only available since JDK 9

@Apache9Apache9 changed the title HBASE-29545 Remove usage of Unsafe.defineClassHBASE-29545 [hbase-thirdparty] Remove usage of Unsafe.defineClassMar 2, 2026
@Apache9

Copy link
Copy Markdown
Contributor

This library is for internal use only and I do not think we need to use defineClass in HBase.

So let's get this in.

@Apache9
Apache9 merged commit b1972ca into apache:masterMar 2, 2026
1 check passed
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.

4 participants

@richardantal@Apache-HBase@stoty@Apache9