[
https://issues.apache.org/jira/browse/HADOOP-20014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jose Luis López updated HADOOP-20014:
-------------------------------------
Description:
*Goal*: run JerseyTest on the JDK's built-in HTTP server
(jersey-test-framework-provider-jdk-http) instead of Jetty. Jersey 2 has no
container for Jetty 12, so this has to happen before HADOOP-19972. Doing it now
takes it out of that upgrade. Production HTTP is not touched.
*Scope*:
* hadoop-project/pom.xml: manage jersey-test-framework-provider-jdk-http in
place of -jetty, and keep the servlet API exclusion on it.
* The 13 module poms that use provider-jetty: switch the artifactId.
* hadoop-client-minicluster/pom.xml:
** bundle the jdk-http provider instead of the jetty one;
** declare org.eclipse.jetty:jetty-util directly, as <optional>true</optional>.
Today the minicluster's only copy arrives through provider-jetty ->
jersey-container-jetty-http, because its other dependencies exclude jetty-util
as "in client". Without this, the switch would leave org.eclipse.jetty.util in
neither shaded jar;
** add com/sun/net/httpserver/* and com/sun/net/httpserver/**/* to the com/
relocation excludes. These are JDK classes and must not be relocated.
* LICENSE-binary: jersey-test-framework-provider-jetty ->
jersey-test-framework-provider-jdk-http.
* hadoop-client-runtime/pom.xml: *no change*. The jetty-util and
jetty-continuation exclusions stay.
*Downstream*:
* hadoop-client-runtime: unchanged, same jar contents.
* hadoop-client-minicluster: keeps jetty-util. It loses the relocated
jetty-continuation and jersey-container-jetty-http classes and gains the
relocated jersey jdk-http container. All of these are under
org.apache.hadoop.shaded and are not API.
*Impact on Jetty 9*: production is unchanged, and HttpServer2 stays on Jetty
9.4. In the tests, JerseyTest no longer runs on Jetty. No test uses a servlet
deployment. 58 of the 60 JerseyTest classes bind
HttpServletRequest/HttpServletResponse mocks. JerseyTestBase is a base class,
and the resourceestimator resource uses no servlet types.
*Side effect*: removes the unmanaged jetty-continuation 9.4.55 that
provider-jetty brought in.
*CI*: touches hadoop-project, so a full build.
was:
hadoop-project, the 13 poms using provider-jetty, hadoop-client-runtime (ships
jetty-util again), hadoop-client-minicluster (stops relocating
com.sun.net.httpserver), LICENSE-binary.
Delete runtime pom.xml:170.
Add a jetty-util <exclusion> on jersey-test-framework-provider-jetty.
Fix the stale comment at runtime pom.xml:166-169.
Leave the no-op jetty-server and continuation exclusions alone for the smallest
diff.
It is a 3.5.0 regression with a runtime-only bug of its own, and it does not
depend on the Jersey work. After it lands, #8699 only needs to remove the
provider, and its runtime-pom hunk disappears.
*Poms:* replace jersey-test-framework-provider-jetty with -jdk-http in
hadoop-project and the 13 module poms that use it.
*Minicluster shading*: in hadoop-client-minicluster/pom.xml, use the jdk-http
provider. Also add com/sun/net/httpserver/* and **/* to the relocation
excludes, because those are JDK classes and must not be relocated.
*Client-runtime*: in hadoop-client-runtime/pom.xml:170,173, stop excluding
jetty-util and jetty-continuation.
YARN-11793 added the jetty-util exclusion only because provider-jetty brought
it into the minicluster. Once that path is gone, the runtime jar ships it
again, as the minicluster’s comment “it’s in client” already assumes.
The jetty-continuation exclusion no longer matches anything.
*Impact on Jetty 9:*
Production HTTP is unchanged: HttpServer2 stays on 9.4.58.
Tests change: JerseyTest now runs on the JDK’s built-in server instead of
Jetty. The risk is low. No test uses a servlet deployment, and 58 of the 60
JerseyTest classes bind HttpServletRequest/HttpServletResponse mocks, so they
don’t need a servlet container. Of the other two, one is the JerseyTestBase
base class, and resourceestimator uses no servlet types.
*Visible to downstream*: the hadoop-client-runtime jar gets shaded
org.eclipse.jetty.util back, as before YARN-11793. The shaded-client invariant
checks and BanDuplicateClasses in the build verify this.
CI: touches hadoop-project, so a full build.
*Why now*: there is no Jersey 2 container for Jetty 12,
> HADOOP — Run the Jersey tests on the JDK HTTP server instead of Jetty
> ---------------------------------------------------------------------
>
> Key: HADOOP-20014
> URL: https://issues.apache.org/jira/browse/HADOOP-20014
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: hadoop-common, test
> Reporter: Jose Luis López
> Priority: Minor
>
> *Goal*: run JerseyTest on the JDK's built-in HTTP server
> (jersey-test-framework-provider-jdk-http) instead of Jetty. Jersey 2 has no
> container for Jetty 12, so this has to happen before HADOOP-19972. Doing it
> now takes it out of that upgrade. Production HTTP is not touched.
> *Scope*:
> * hadoop-project/pom.xml: manage jersey-test-framework-provider-jdk-http in
> place of -jetty, and keep the servlet API exclusion on it.
> * The 13 module poms that use provider-jetty: switch the artifactId.
> * hadoop-client-minicluster/pom.xml:
> ** bundle the jdk-http provider instead of the jetty one;
> ** declare org.eclipse.jetty:jetty-util directly, as
> <optional>true</optional>. Today the minicluster's only copy arrives through
> provider-jetty -> jersey-container-jetty-http, because its other dependencies
> exclude jetty-util as "in client". Without this, the switch would leave
> org.eclipse.jetty.util in neither shaded jar;
> ** add com/sun/net/httpserver/* and com/sun/net/httpserver/**/* to the com/
> relocation excludes. These are JDK classes and must not be relocated.
> * LICENSE-binary: jersey-test-framework-provider-jetty ->
> jersey-test-framework-provider-jdk-http.
> * hadoop-client-runtime/pom.xml: *no change*. The jetty-util and
> jetty-continuation exclusions stay.
> *Downstream*:
> * hadoop-client-runtime: unchanged, same jar contents.
> * hadoop-client-minicluster: keeps jetty-util. It loses the relocated
> jetty-continuation and jersey-container-jetty-http classes and gains the
> relocated jersey jdk-http container. All of these are under
> org.apache.hadoop.shaded and are not API.
> *Impact on Jetty 9*: production is unchanged, and HttpServer2 stays on Jetty
> 9.4. In the tests, JerseyTest no longer runs on Jetty. No test uses a servlet
> deployment. 58 of the 60 JerseyTest classes bind
> HttpServletRequest/HttpServletResponse mocks. JerseyTestBase is a base class,
> and the resourceestimator resource uses no servlet types.
> *Side effect*: removes the unmanaged jetty-continuation 9.4.55 that
> provider-jetty brought in.
> *CI*: touches hadoop-project, so a full build.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]