[
https://issues.apache.org/jira/browse/HADOOP-20016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18139747#comment-18139747
]
ASF GitHub Bot commented on HADOOP-20016:
-----------------------------------------
joseluisll commented on PR #8894:
URL: https://github.com/apache/hadoop/pull/8894#issuecomment-6690605621
@pjfanning Yetus is red because of test4tests. This is only a POM PR. The
build fails due to a flake, and I have a PR for it since lot of time:
HADOOP-19997 -> #8783 , if you want to review it as well.
> Declare the Jetty artifacts each module imports directly
> --------------------------------------------------------
>
> Key: HADOOP-20016
> URL: https://issues.apache.org/jira/browse/HADOOP-20016
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: mapreduce
> Reporter: Jose Luis López
> Assignee: Jose Luis López
> Priority: Minor
> Labels: pull-request-available
>
> *Scope*: every module that imports Jetty classes from an artifact it only
> receives transitively declares that artifact, at the scope it already
> resolves at:
> * hadoop-project/pom.xml: manage jetty-http and jetty-io at ${jetty.version}.
> Neither is managed today.
> * jetty-http, imported by HttpServer2 and McpHttpServer (hadoop-common),
> ShuffleChannelHandler (mapreduce-client-shuffle), TestJettyHelper
> (hadoop-hdfs-httpfs) and SLSWebApp (hadoop-sls): declare it optional in
> hadoop-common, mapreduce-client-shuffle and hadoop-hdfs-httpfs, and provided
> in hadoop-sls, like the module's jetty-server.
> * jetty-webapp, used through WebAppContext: declare it provided in
> yarn-common (WebApps exposes WebAppContext), resourcemanager and
> applicationhistoryservice (which also gets jetty-servlet, provided, for
> FilterHolder), and at compile scope in the router, which serves the UI2 war.
> A test scope would take it off the Router's runtime classpath.
> * hadoop-hdfs: TransferFsImage imports org.eclipse.jetty.io.EofException.
> Declare jetty-io, optional.
> * hadoop-hdfs-httpfs (tests): declare jetty-servlet, and jetty-util as
> optional.
> * hadoop-mapreduce-client-jobclient (tests): declare jetty-server and
> jetty-servlet, provided.
> * hadoop-yarn-server-nodemanager: TerminalServlet extends DefaultServlet.
> Declare jetty-servlet.
> * hadoop-yarn-server-router (tests): declare jetty-server, jetty-servlet and
> jetty-util.
> * hadoop-yarn-server-web-proxy (tests): declare jetty-servlet, provided, and
> jetty-util.
> *Out of scope*: the websocket artifacts, which Jetty 12 replaces entirely;
> the NodeManager and yarn-client already declare one each.
> *Why*: these modules compile against Jetty they only get transitively, mostly
> through hadoop-common. Declaring it records each module's direct Jetty use
> for the Jetty 12 ee8 upgrade (HADOOP-19972) and the later jakarta migration
> (HADOOP-19395), where hadoop-common may stop exporting some of these
> artifacts.
> *Why optional*: it keeps the declaration for compiling each module without
> passing it on, so what downstream projects resolve does not change. At plain
> compile scope it did: Maven's nearest-wins mediation picked Hadoop's
> jetty-http over another one at the same depth, and a project with
> jetty-client 9.4.40 next to hadoop-common resolved jetty-http 9.4.58 instead
> of 9.4.40. jetty-io in hadoop-hdfs and jetty-util in hadoop-hdfs-httpfs
> reached those modules only through jetty-server, so they are optional for the
> same reason. In the shuffle handler, trunk already resolves jetty-http at
> compile scope (through the NodeManager and mapreduce-client-common); optional
> keeps that, whereas provided would change it (review on PR #8699). It is not
> copied into the mapreduce lib directory.
> *Impact on Jetty 9*: none. pom changes only. Every artifact already resolves
> at 9.4.58 in each module, at the same scope, so each module's dependency tree
> is unchanged.
> *Downstream*: none. Projects that depend on these modules keep resolving the
> same Jetty artifacts.
> *CI*: touches hadoop-project, so a full build.
> *PR*: https://github.com/apache/hadoop/pull/8894
> Regrouped on 2026-11-04 by kind of change, as suggested in the review: this
> issue now holds all the pom changes that were split between HADOOP-20015
> (YARN) and HADOOP-20016 (HADOOP); HADOOP-20015 holds all the Java changes.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]