Skip to content

YARN-11925. Fix the configurability of RM webservice class#8215

Open
p-szucs wants to merge 4 commits intoapache:trunkfrom
p-szucs:YARN-11925-webservice-class
Open

YARN-11925. Fix the configurability of RM webservice class#8215
p-szucs wants to merge 4 commits intoapache:trunkfrom
p-szucs:YARN-11925-webservice-class

Conversation

@p-szucs
Copy link
Contributor

@p-szucs p-szucs commented Jan 29, 2026

Change-Id: I108120c5407ed103adfcfcb469c44c7ed3de9999

Description of PR

RM webservice class is not configurable in trunk with the "yarn.webapp.custom.webservice.class" property since the upgrade to Jersey 2. The patch

  • registers webservice class that is configured in the above property
  • removes package scan on "org.apache.hadoop.yarn.server.resourcemanager.webapp" to avoid registering RMWebServices class at the same time

How was this patch tested?

Tested on a cluster with custom webservice class

For code changes:

  • Does the title or this PR starts 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?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

AI Tooling

If an AI tool was used:

Change-Id: I108120c5407ed103adfcfcb469c44c7ed3de9999
@p-szucs p-szucs force-pushed the YARN-11925-webservice-class branch from d42bd4c to fe177c2 Compare January 29, 2026 13:11
Change-Id: Idd77e98c62e68efe27c27daea20c1e2a438d749e
@p-szucs p-szucs marked this pull request as ready for review January 30, 2026 10:23
@p-szucs p-szucs force-pushed the YARN-11925-webservice-class branch from 4141a52 to 9d12c7a Compare January 30, 2026 10:31
Change-Id: I75a5d80815847d576c5c2240c06399d8d1611018
@p-szucs p-szucs force-pushed the YARN-11925-webservice-class branch from 9d12c7a to d9c818c Compare January 30, 2026 11:01
Copy link
Contributor

@K0K0V0K K0K0V0K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @p-szucs for the fix!
LGTM!

Copy link
Contributor

@Hean-Chhinling Hean-Chhinling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @p-szucs for the patch.
I do have a small question regarding the used of debug log but maybe it depends on the Author styles.

Class webService = config.getClass(YarnConfiguration.YARN_WEBAPP_CUSTOM_WEBSERVICE_CLASS,
RMWebServices.class);
resourceConfig.register(webService);
if (LOG.isDebugEnabled()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the debug log by default will run when the log level set to DEBUG (like here)?
I think the LOG.isDebugEnabled() is used when it is needed to run more code there.
E.g.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, we don't need to guard this with the conditional. LGTM after making that change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Hean-Chhinling and @cnauroth for the suggestion, removed the conditional

Class webService = config.getClass(YarnConfiguration.YARN_WEBAPP_CUSTOM_WEBSERVICE_CLASS,
RMWebServices.class);
resourceConfig.register(webService);
if (LOG.isDebugEnabled()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, we don't need to guard this with the conditional. LGTM after making that change.

Change-Id: I3aaf96779cc9e4e688f9c417017f35a0e8d22892
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants