-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-29226 Migrate to jetty 12 with EE8 and bump java servlet to 4.0.1 #6783
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
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
Outdated
Show resolved
Hide resolved
hbase-it/src/test/java/org/apache/hadoop/hbase/MockHttpApiRule.java
Outdated
Show resolved
Hide resolved
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/NamespacesResource.java
Outdated
Show resolved
Hide resolved
...shaded/hbase-shaded-check-invariants/src/test/resources/ensure-jars-have-correct-contents.sh
Show resolved
Hide resolved
@@ -863,9 +863,9 @@ | |||
<jackson.version>2.17.2</jackson.version> | |||
<jackson.databind.version>2.17.2</jackson.databind.version> | |||
<jaxb-api.version>2.3.1</jaxb-api.version> | |||
<servlet.api.version>3.1.0</servlet.api.version> | |||
<servlet.api.version>4.0.1</servlet.api.version> |
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.
just a note: hbase worked with 3.1.0 as well but as per https://stackoverflow.com/questions/77007560/missing-jetty-servlet-12-0-0-dependency we should be on 4.x
hbase-it/src/test/java/org/apache/hadoop/hbase/MockHttpApiRule.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -267,7 +266,11 @@ private void process(String urlString) throws Exception { | |||
|
|||
HttpURLConnection connection = connect(url); | |||
|
|||
HttpExceptionUtils.validateResponse(connection, 200); | |||
// We implement the validateResponse method inside hbase to handle for HTML response. |
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.
added note for reviewers' ease, let me know if should drop before merge
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.
also previous method was not useful, the error is HTML but it parses JSON
hbase-http/src/test/java/org/apache/hadoop/hbase/http/log/TestLogLevel.java
Show resolved
Hide resolved
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
Outdated
Show resolved
Hide resolved
hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestGetAndPutResource.java
Show resolved
Hide resolved
hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSecureRESTServer.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
<!-- | ||
Copyright (C) Jetty Authors | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); |
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.
Not sure why we even had this file in our codebase. Tried deleting to find regression, all UTs ran fine locally. Anyone could help me with how to validate if this is even needed?
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.
This should be coming from the ee support in jetty.
Though I believe we're not using the web.xml server config at all in HBase.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
What's the status here ? |
I have verified all major flows in a separate jira. Could not get any more reviews here. We need to merge thirdparty change, release that, consume here and merge this. |
FYR |
With jetty 12.0.20 we have fixed jetty/jetty.project#12958 i.e. "Discrepancy between Jetty 9 and Jetty 12 when setting the base resource to a path containing .." Hence changes for handling log directory has been reverted. Lets see if tests go well with latest hbase-thirdparty |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Retriggered to consume latest hbase-thirdparty snapshot at apache/hbase-thirdparty#137 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
… add details on why we need violations
… - Discrepancy between Jetty 9 and Jetty 12 when setting the base resource to a path containing ..
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Please find a detailed summary of all changes as below:
Dependencies
hbase-shaded-jetty
i.e. Jetty 9 withhbase-shaded-jetty-12-plus-core
andhbase-shaded-jetty-12-plus-ee8
i.e. Jetty 12 EE8servlet.api.version
to4.0.1
tomcat.jasper.version
to9.0.102
Code Adjustments
org.eclipse.jetty.ee8
etc. as per Jetty 12HandlerCollection
withHandler.Sequence
setResourceBase()
withsetBaseResourceAsPath()
. Also, passinglogDir
path in canonical format as otherwise, we get404
in case we have\..\
in static path...
jetty/jetty.project#12958MultiException
withExceptionUtil.MultiException
inHttpServer.java
.webServer.getHandlers()
with new return type:Array
toList
Constraint
withServletConstraint
LogLevelExceptionUtils.java
to handle HTML error response for log levels asconnection.getResponseMessage()
now returns error code as string in message and hence causes test failure otherwisejavax
as xsd files atjavax/servlet/resources
come viaorg.apache.hbase.thirdparty:hbase-shaded-jetty-12-ee8
Test Adjustments
checkBindAddress()
to callserver.start()
elsetestBindAddress()
fails with NPE. Verified doing same without Jetty 12 works as well.JSON.parse()
withnew JSON().fromJSON()
andJSON.toString()
withnew JSON().toJSON()
".."
to""
as it fails withIllegalArgumentException
otherwiseMockHttpApiRule
where we replaceAbstractHandler
withHandler.Abstract
and adjust code based on new interface.webdefaults.xml
. Need to see if still needed.References