[
https://issues.apache.org/jira/browse/HADOOP-19999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jose Luis López updated HADOOP-19999:
-------------------------------------
Description:
Sub-task of HADOOP-19912 (preparation on trunk; no namespace change).
h3. Why
Guice is the dependency-injection framework behind the YARN and MapReduce web
applications. Hadoop uses {{guice}} and {{guice-servlet}} 5.1.0.
Guice 7 is jakarta-only: {{guice}} 7 depends on {{jakarta.inject}} alone, and
{{guice-servlet}} 7 on {{jakarta.servlet}}. Guice 6 sits in between:
* {{guice}} 6.0.0 depends on both {{javax.inject}} and {{jakarta.inject-api}},
and honours both sets of annotations;
* {{guice-servlet}} 6.0.0 still uses {{javax.servlet}}, so it keeps working on
Jetty 12 ee8.
Moving to Guice 6 now changes no namespace and should need no code change. When
HADOOP-19395 switches to jakarta, Guice then only needs a version bump to 7
alongside the {{javax.inject}} → {{jakarta.inject}} imports, instead of a major
upgrade on top of the namespace change.
h3. Where Guice is used
* The YARN web framework: {{WebApp}} extends {{ServletModule}}, and {{WebApps}}
installs {{GuiceFilter}} in {{HttpServer2}}.
* The web apps built on it, in 14 modules: ResourceManager, NodeManager,
ApplicationHistoryService, timeline service, Router, GlobalPolicyGenerator,
SharedCacheManager, yarn-server-common, yarn-common, the MapReduce AM and
JobHistoryServer, yarn-services-api, MaWo and resourceestimator.
* About 104 main source files import {{com.google.inject}} or {{javax.inject}}.
* The main imports: {{com.google.inject.Inject}} 75, {{Injector}} 24,
{{javax.inject.Singleton}} 24, {{javax.inject.Inject}} 15,
{{com.google.inject.servlet.RequestScoped}} 7, {{javax.inject.Named}} 5.
h3. Change
* Set {{guice.version}} in {{hadoop-project}} from 5.1.0 to 6.0.0; it covers
both {{guice}} and {{guice-servlet}}.
* {{guice}} 6 adds {{jakarta.inject:jakarta.inject-api}} as a transitive
dependency. Add it to LICENSE-binary, and check the shaded clients:
{{hadoop-client-minicluster}} bundles Guice, so its relocations and the
duplicate-class checks must accept the new {{jakarta.inject}} classes.
* Keep the existing {{javax.inject}} dependency and imports. Converting them
belongs to the switch in HADOOP-19395.
h3. Testing
* The web service and web app tests of the modules above, among them
{{TestRMWebServices*}}, {{TestNMWebServices*}}, {{TestAHSWebServices}},
{{TestAMWebServices*}}, {{TestHsWebServices*}} and the Router web tests.
* The shaded client build with its {{BanDuplicateClasses}} and jar-content
checks, and {{ITUseMiniCluster}}.
* A quick check on a running cluster: the RM, NM and JobHistoryServer UIs and
REST endpoints.
h3. Out of scope
* Guice 7, {{jakarta.inject}} imports and {{jakarta.servlet}}: HADOOP-19395.
* Replacing {{com.google.inject.Inject}} with the standard annotations.
> Upgrade Guice 5.1.0 → 6.x
> -------------------------
>
> Key: HADOOP-19999
> URL: https://issues.apache.org/jira/browse/HADOOP-19999
> Project: Hadoop Common
> Issue Type: Sub-task
> Reporter: Jose Luis López
> Priority: Minor
>
> Sub-task of HADOOP-19912 (preparation on trunk; no namespace change).
> h3. Why
> Guice is the dependency-injection framework behind the YARN and MapReduce web
> applications. Hadoop uses {{guice}} and {{guice-servlet}} 5.1.0.
> Guice 7 is jakarta-only: {{guice}} 7 depends on {{jakarta.inject}} alone, and
> {{guice-servlet}} 7 on {{jakarta.servlet}}. Guice 6 sits in between:
> * {{guice}} 6.0.0 depends on both {{javax.inject}} and
> {{jakarta.inject-api}}, and honours both sets of annotations;
> * {{guice-servlet}} 6.0.0 still uses {{javax.servlet}}, so it keeps working
> on Jetty 12 ee8.
> Moving to Guice 6 now changes no namespace and should need no code change.
> When HADOOP-19395 switches to jakarta, Guice then only needs a version bump
> to 7 alongside the {{javax.inject}} → {{jakarta.inject}} imports, instead of
> a major upgrade on top of the namespace change.
> h3. Where Guice is used
> * The YARN web framework: {{WebApp}} extends {{ServletModule}}, and
> {{WebApps}} installs {{GuiceFilter}} in {{HttpServer2}}.
> * The web apps built on it, in 14 modules: ResourceManager, NodeManager,
> ApplicationHistoryService, timeline service, Router, GlobalPolicyGenerator,
> SharedCacheManager, yarn-server-common, yarn-common, the MapReduce AM and
> JobHistoryServer, yarn-services-api, MaWo and resourceestimator.
> * About 104 main source files import {{com.google.inject}} or
> {{javax.inject}}.
> * The main imports: {{com.google.inject.Inject}} 75, {{Injector}} 24,
> {{javax.inject.Singleton}} 24, {{javax.inject.Inject}} 15,
> {{com.google.inject.servlet.RequestScoped}} 7, {{javax.inject.Named}} 5.
> h3. Change
> * Set {{guice.version}} in {{hadoop-project}} from 5.1.0 to 6.0.0; it covers
> both {{guice}} and {{guice-servlet}}.
> * {{guice}} 6 adds {{jakarta.inject:jakarta.inject-api}} as a transitive
> dependency. Add it to LICENSE-binary, and check the shaded clients:
> {{hadoop-client-minicluster}} bundles Guice, so its relocations and the
> duplicate-class checks must accept the new {{jakarta.inject}} classes.
> * Keep the existing {{javax.inject}} dependency and imports. Converting them
> belongs to the switch in HADOOP-19395.
> h3. Testing
> * The web service and web app tests of the modules above, among them
> {{TestRMWebServices*}}, {{TestNMWebServices*}}, {{TestAHSWebServices}},
> {{TestAMWebServices*}}, {{TestHsWebServices*}} and the Router web tests.
> * The shaded client build with its {{BanDuplicateClasses}} and jar-content
> checks, and {{ITUseMiniCluster}}.
> * A quick check on a running cluster: the RM, NM and JobHistoryServer UIs and
> REST endpoints.
> h3. Out of scope
> * Guice 7, {{jakarta.inject}} imports and {{jakarta.servlet}}: HADOOP-19395.
> * Replacing {{com.google.inject.Inject}} with the standard annotations.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]