[ 
https://issues.apache.org/jira/browse/YARN-11925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18055887#comment-18055887
 ] 

ASF GitHub Bot commented on YARN-11925:
---------------------------------------

Hean-Chhinling commented on code in PR #8215:
URL: https://github.com/apache/hadoop/pull/8215#discussion_r2753554311


##########
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:
   Is the debug log by default will run when the log level set to DEBUG (like 
[here](https://github.com/apache/hadoop/blob/f79bca8369de55c57c672b833709a3e15fafdd40/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractLeafQueue.java#L822))?
   I think the LOG.isDebugEnabled() is used when it is needed to run more code 
there.
   E.g. 
https://github.com/apache/hadoop/blob/f79bca8369de55c57c672b833709a3e15fafdd40/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java#L831
   
   





> Fix the configurability of RM webservice class
> ----------------------------------------------
>
>                 Key: YARN-11925
>                 URL: https://issues.apache.org/jira/browse/YARN-11925
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager, yarn
>    Affects Versions: 3.5.0
>            Reporter: Peter Szucs
>            Assignee: Peter Szucs
>            Priority: Major
>              Labels: pull-request-available
>
> RM webservice class is not configurable in trunk with the 
> "yarn.webapp.custom.webservice.class" property since the upgrade to Jersey 2. 
> The aim of this ticket is to restore this functionality



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to