[ 
https://issues.apache.org/jira/browse/HADOOP-20014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134770#comment-18134770
 ] 

ASF GitHub Bot commented on HADOOP-20014:
-----------------------------------------

joseluisll opened a new pull request, #8892:
URL: https://github.com/apache/hadoop/pull/8892

   ### Description of PR
   
   Part of HADOOP-19912 (Jetty 12 on ee8): split out of #8699, where it was 
reviewed.
   
   `JerseyTest` moves from `jersey-test-framework-provider-jetty` to 
`jersey-test-framework-provider-jdk-http`, which runs on the JDK's built-in 
HTTP server and needs no third-party server (review on #8699: neither grizzly2 
nor simple). Jersey 2 has no container for Jetty 12, so this has to land before 
the Jetty 12 upgrade. Production HTTP is untouched: `HttpServer2` stays on 
Jetty 9.4.
   
   - hadoop-project: manage `provider-jdk-http` in place of `provider-jetty`, 
keeping the `javax.servlet-api` exclusion.
   - Module poms: switch the artifactId.
   - hadoop-client-minicluster: bundle the jdk-http provider, and do not 
relocate the JDK's `com/sun/net/httpserver` classes. `jetty-util` used to 
arrive only through `provider-jetty`, so it is now declared directly 
(optional), keeping it in the minicluster jar. `hadoop-client-runtime` is 
untouched, so it still ships no `jetty-util` (YARN-11793).
   - LICENSE-binary: replace the provider entry, and add 
`jersey-container-jdk-http`, which the provider brings and minicluster bundles.
   
   ### How was this patch tested?
   
   - The Jersey-based tests ran on the jdk-http provider in the fork's CI. The 
only failure was `TestSSLHttpServerMTLS`, a known intermittent failure 
(HADOOP-19997) unrelated to this change.
   - In the built jars, `hadoop-client-runtime` has 0 `org/eclipse/jetty/util` 
classes and `hadoop-client-minicluster` keeps its relocated `jetty-util` 
classes.
   
   ### For code changes:
   
   - [x] Does the title of this PR start with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: Have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation? (not 
applicable)
   - [x] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? (Jersey jdk-http 
provider and container: same licence as the other Jersey artifacts)
   - [x] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   ### AI Tooling
   
   If an AI tool was used:
   
   - [x] The PR includes the phrase "Contains content generated by <tool>" 
where <tool> is the name of the AI tool used.
   - [x] My use of AI contributions follows the ASF legal policy 
https://www.apache.org/legal/generative-tooling.html
   
   Contains content generated by Claude Code.
   




> 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
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to