TaoYang526 commented on code in PR #7448:
URL: https://github.com/apache/hadoop/pull/7448#discussion_r1986467392


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java:
##########
@@ -455,8 +458,15 @@ public void reinitialize(Configuration newConf, RMContext 
rmContext,
         refreshMaximumAllocation(
             ResourceUtils.fetchMaximumAllocationFromConfig(this.conf));
         reinitializeQueues(this.conf);
+        reinitRequestsHandler(this.conf);
       } catch (Throwable t) {
         this.conf = oldConf;
+        try {
+          reinitRequestsHandler(this.conf);
+        } catch (Throwable innerT) {
+          LOG.error("Failed to re-init requests handler : {}",

Review Comment:
   Thanks @zeekling  for the review. 
   oldConf is a configuration that has already been validated and is in effect, 
the invocation of CapacityScheduler#reinitRequestsHandler here will not throw 
an exception actually. The purpose of this try/catch block is only included to 
make sure that the original rollback logic remains unaffected.



-- 
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]

Reply via email to