p-szucs commented on code in PR #8215:
URL: https://github.com/apache/hadoop/pull/8215#discussion_r2773122637
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMWebApp.java:
##########
@@ -54,15 +54,21 @@ public RMWebApp(ResourceManager rm) {
this.rm = rm;
}
- public ResourceConfig resourceConfig() {
- ResourceConfig config = new ResourceConfig();
- config.packages("org.apache.hadoop.yarn.server.resourcemanager.webapp");
- config.register(new JerseyBinder());
- config.register(RMWebServices.class);
- config.register(GenericExceptionHandler.class);
- config.register(JsonProviderFeature.class);
- config.register(JAXBContextResolver.class);
- return config;
+ public ResourceConfig resourceConfig(Configuration config) {
+ ResourceConfig resourceConfig = new ResourceConfig();
+ resourceConfig.register(new JerseyBinder());
+
+ Class webService =
config.getClass(YarnConfiguration.YARN_WEBAPP_CUSTOM_WEBSERVICE_CLASS,
+ RMWebServices.class);
+ resourceConfig.register(webService);
+ if (LOG.isDebugEnabled()) {
Review Comment:
Thanks @Hean-Chhinling and @cnauroth for the suggestion, removed the
conditional
--
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]