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

   ### Description of PR
   
   Several modules resolve more than one Jetty release, and more than one 
servlet
   API, on a single classpath. Both combinations compile and then fail at run 
time,
   on whichever code path reaches the wrong jar.
   
   Intended result:
   
   * Every module resolves one Jetty release. Three are in play today: 9.4.44 
and
     9.4.55 reach some classpaths beside the managed 9.4.58.
   * Every module resolves one servlet API. `javax.servlet:javax.servlet-api` 
and
     `jakarta.servlet:jakarta.servlet-api` both publish the `javax.servlet`
     packages, and 73 modules carry both, so which one a module compiles and 
runs
     against is decided by the order of the jars rather than by anything in a 
pom.
   * Every module that uses Jetty in its main sources declares it. Four do not, 
and
     compile only because some other dependency happens to supply it.
   * The unused JSP API is gone. It reaches around eighty-five classpaths 
through
     hadoop-common, and nothing in the tree uses JSP.
   
   One module keeps two servlet APIs: 
`hadoop-yarn-server-timelineservice-hbase-tests`,
   where the second arrives with HBase's own test stack.
   
   None of this depends on a Jetty version change.
   
   Two notes for reviewers:
   
   * `hadoop-common` now compiles against Servlet 4.0 rather than 3.1. Servlet 
4.0
     is a superset and its additions are `default` interface methods, so the
     Jetty 9.4 implementation still satisfies them.
   * This overlaps the Jetty 12 work in #8653 in one place. Rebasing that PR 
onto
     this branch produces a single conflict in `hadoop-project/pom.xml`, where
     removing the JSP entry aligns our `jakarta.servlet-api` entry against its
     renamed websocket client. The two are unrelated entries; the resolution is 
to
     keep both.
   
   Contains content generated by Claude.
   
   ### How was this patch tested?
   
   Built and tested locally on Linux with JDK 17.
   
   Dependency resolution was compared before and after with `mvn 
dependency:tree`
   across all modules:
   
   | | before | after |
   | --- | --- | --- |
   | Jetty releases resolved | 9.4.44 ×9, 9.4.55 ×20, 9.4.58 ×1274 | 9.4.58 
×1294 |
   | modules with two servlet APIs | 73 | 1 |
   | modules using Jetty undeclared | 4 | 0 |
   
   Unit tests, all passing:
   
   * `hadoop-common` — 61 tests in `org.apache.hadoop.http`, covering 
`HttpServer2`,
     the servlet filters and the SSL server, since this is the module whose 
servlet
     API changes.
   * `hadoop-yarn-server-applicationhistoryservice` — 209 tests, including
     `TestTimelineWebServices`, which exercises the Jersey Jetty test container 
that
     `jetty-continuation` backs.
   * `hadoop-mapreduce-client-shuffle` — 17 tests.
   * `hadoop-yarn-applications-catalog-webapp` — `TestAppCatalogSolrClient`, 
which
     is the module the Solr exclusions affect.
   
   Clean builds of `hadoop-common`, `hadoop-mapreduce-client-app`,
   `hadoop-mapreduce-client-shuffle`, `hadoop-yarn-server-router`,
   `hadoop-yarn-server-applicationhistoryservice` and
   `hadoop-yarn-applications-catalog-webapp`.
   
   `hadoop-yarn-server-router`'s `TestRouterWebServicesREST` fails 
intermittently,
   with a different subset each run. It does so on an unmodified trunk checkout 
as
   well, so it is unrelated to this change.
   
   ### 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? *Note: 
Automated CI
         testing doesn't cover all cases so manual testing with cloud storage 
is still
         required.*
   - [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)?
   - [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 Claude"
         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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to