Skip to content

HBASE-29226 Migrate to jetty 12 with EE8 and bump java servlet to 4.0.1 - #6783

Merged
NihalJain merged 17 commits into
apache:masterfrom
NihalJain:jetty12
Aug 22, 2025
Merged

HBASE-29226 Migrate to jetty 12 with EE8 and bump java servlet to 4.0.1#6783
NihalJain merged 17 commits into
apache:masterfrom
NihalJain:jetty12

Conversation

@NihalJain

@NihalJainNihalJain commented Mar 11, 2025

Copy link
Copy Markdown
Contributor

Please find a detailed summary of all changes as below:

Dependencies

  • Replaced hbase-shaded-jetty i.e. Jetty 9 with hbase-shaded-jetty-12-plus-core and hbase-shaded-jetty-12-plus-ee8 i.e. Jetty 12 EE8
  • Upgrade servlet.api.version to 4.0.1
  • Upgrade tomcat.jasper.version to 9.0.107

Code Adjustments

Test Adjustments

References

@NihalJain
NihalJain marked this pull request as draft March 11, 2025 20:31
@NihalJain

This comment was marked as duplicate.

Comment threadhbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java Outdated
Comment threadhbase-it/src/test/java/org/apache/hadoop/hbase/MockHttpApiRule.java Outdated
Comment threadpom.xml
Comment threadpom.xml
Comment threadhbase-it/src/test/java/org/apache/hadoop/hbase/MockHttpApiRule.java Outdated
@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@NihalJainNihalJain changed the title [WIP] Migrate to jetty 12 with EE8 and bump java servlet to 4.0.1HBASE-29226 Migrate to jetty 12 with EE8 and bump java servlet to 4.0.1Mar 27, 2025
Comment threadhbase-http/src/main/java/org/apache/hadoop/hbase/http/log/LogLevel.java Outdated
Comment threadhbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java Outdated
@Apache-HBase

This comment has been minimized.

@NihalJain
NihalJain marked this pull request as ready for review March 27, 2025 12:56
@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@PDavidPDavid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Many thanks, looks great! 👍

@NihalJain

Copy link
Copy Markdown
ContributorAuthor

This PR is unblocked now. Have removed the staging repo ref to build against actual hbase thirdparty release. Let's wait for the CI result.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@NihalJain

Copy link
Copy Markdown
ContributorAuthor

Will merge this after #7207 and then rebase again.

@NihalJain

Copy link
Copy Markdown
ContributorAuthor

Rebased code after thirdparty PR merge, will wait for basic build to complete and then merge today.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 31sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+0 🆗shelldocs0m 0sShelldocs was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ master Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for branch
+1 💚mvninstall3m 17smaster passed
+1 💚compile8m 19smaster passed
+1 💚checkstyle1m 14smaster passed
+1 💚spotbugs11m 37smaster passed
+1 💚spotless0m 48sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗mvndep0m 17sMaven dependency ordering for patch
+1 💚mvninstall3m 24sthe patch passed
+1 💚compile11m 50sthe patch passed
+1 💚javac11m 50sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
-0 ⚠️checkstyle1m 28s/results-checkstyle-root.txtroot: The patch generated 2 new + 10 unchanged - 0 fixed = 12 total (was 10)
+1 💚shellcheck0m 1sNo new issues.
+1 💚xmllint0m 1sNo new issues.
+1 💚spotbugs15m 58sthe patch passed
+1 💚hadoopcheck14m 56sPatch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚spotless1m 1spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense1m 32sThe patch does not generate ASF License warnings.
88m 53s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6783/24/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#6783
Optional Testsdupname asflicense javac codespell detsecrets xmllint hadoopcheck spotless compile spotbugs checkstyle hbaseanti shellcheck shelldocs
unameLinux 0e04fcddee60 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
Personalitydev-support/hbase-personality.sh
git revisionmaster / 1c8dfa1
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count188 (vs. ulimit of 30000)
modulesC: hbase-http hbase-server hbase-thrift hbase-it hbase-rest hbase-shaded/hbase-shaded-testing-util hbase-shaded/hbase-shaded-check-invariants hbase-shaded/hbase-shaded-with-hadoop-check-invariants . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6783/24/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3 shellcheck=0.8.0 xmllint=20913
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 🆗reexec0m 28sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for branch
+1 💚mvninstall3m 6smaster passed
+1 💚compile2m 5smaster passed
+1 💚javadoc3m 56smaster passed
+1 💚shadedjars5m 59sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 18sMaven dependency ordering for patch
+1 💚mvninstall2m 57sthe patch passed
+1 💚compile2m 6sthe patch passed
+1 💚javac2m 6sthe patch passed
+1 💚javadoc3m 56sthe patch passed
+1 💚shadedjars5m 59spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌unit411m 42s/patch-unit-root.txtroot in the patch failed.
500m 39s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6783/24/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#6783
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 80a055b5719e 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
Personalitydev-support/hbase-personality.sh
git revisionmaster / 1c8dfa1
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6783/24/testReport/
Max. process+thread count7680 (vs. ulimit of 30000)
modulesC: hbase-http hbase-server hbase-thrift hbase-it hbase-rest hbase-shaded/hbase-shaded-testing-util hbase-shaded/hbase-shaded-check-invariants hbase-shaded/hbase-shaded-with-hadoop-check-invariants . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6783/24/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@NihalJain
NihalJain merged commit 8bb4e8c into apache:masterAug 22, 2025
1 check failed
NihalJain added a commit that referenced this pull request Aug 22, 2025
….1 (#7233) (#6783)
Please find a detailed summary of all changes as below:
**Dependencies**
- Replaced `hbase-shaded-jetty` i.e. Jetty 9 with `hbase-shaded-jetty-12-plus-core` and `hbase-shaded-jetty-12-plus-ee8` i.e. Jetty 12 EE8
- Upgrade `servlet.api.version` to `4.0.1`
- Upgrade `tomcat.jasper.version` to `9.0.108`
**Code Adjustments**
- Modified import statements to use `org.eclipse.jetty.ee8` etc. as per Jetty 12
- Replace `HandlerCollection` with `Handler.Sequence`
- Refer https://jetty.org/docs/jetty/12/programming-guide/migration/11-to-12.html#api-changes-handler-sequence - Adjust request log handler.
- Refer https://jetty.org/docs/jetty/12/programming-guide/migration/11-to-12.html#api-changes-handler-requestlog
- Adjust error handlers' set logic based on available methods
- Remove usage of deprecated method `setResourceBase()` with `setBaseResourceAsPath()`. Also, passing `logDir` path in canonical format as otherwise, we get `404` in case we have `\..\` in static path. - Refer jetty/jetty.project#12958
- Remove `MultiException` with `ExceptionUtil.MultiException` in `HttpServer.java`.
- Modify assignment: `webServer.getHandlers()` with new return type: `Array` to `List`
- Replaced `Constraint` with `ServletConstraint`
- Added `LogLevelExceptionUtils.java` to handle HTML error response for log levels as `connection.getResponseMessage()` now returns error code as string in message and hence causes test failure otherwise
- Allow `javax` as xsd files at `javax/servlet/resources` come via `org.apache.hbase.thirdparty:hbase-shaded-jetty-12-ee8 `
**Test Adjustments**
- Update `checkBindAddress()` to call `server.start()` else `testBindAddress()` fails with NPE. Verified doing same without Jetty 12 works as well.
- Replace `JSON.parse()` with `new JSON().fromJSON()` and `JSON.toString()` with `new JSON().toJSON()`
- Update app name from `".."` to `""` as it fails with `IllegalArgumentException` otherwise
- Update `MockHttpApiRule` where we replace `AbstractHandler` with `Handler.Abstract` and adjust code based on new interface. - Refer https://jetty.org/docs/jetty/12/programming-guide/migration/11-to-12.html#handler-request-content-apis
- Deleted `webdefaults.xml`. Need to see if still needed.
- Added necessary compliance rules for URI validation, required by tests and possibly users as well. Add note for what fails if these rules are not there in tests. - Refer jetty/jetty.project#11890 (comment)
**References**
- Umbrealla at HBASE-29224
- Discussion at https://lists.apache.org/thread/bkrfm705kqd3bqzyvo7jv46t6p64x2n5
- Dependent thirdparty change at apache/hbase-thirdparty@fd76b1e
Signed-off-by: Dávid Paksy <paksyd@apache.org>
Signed-off-by: Istvan Toth <stoty@apache.org>
EungsopYoo pushed a commit to EungsopYoo/hbase that referenced this pull request Sep 26, 2025
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.

5 participants

@NihalJain@Apache-HBase@stoty@PDavid