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

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

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.





> Implement dynamic requests handling in CapacityScheduler
> --------------------------------------------------------
>
>                 Key: YARN-11781
>                 URL: https://issues.apache.org/jira/browse/YARN-11781
>             Project: Hadoop YARN
>          Issue Type: New Feature
>          Components: capacityscheduler
>            Reporter: Tao Yang
>            Assignee: Tao Yang
>            Priority: Major
>              Labels: pull-request-available
>
> This feature introduces a dynamic request handling mechanism in the 
> CapacityScheduler, allowing for the modification of resource and scheduling 
> requests based on configurable rules. This enables more flexible and adaptive 
> resource management without requiring a restart of the ResourceManager.
> Benefits:
>  * Increased Flexibility: Administrators can define custom rules for 
> modifying requests, allowing for more tailored resource allocation strategies.
>  * Enhanced Scheduling: The ability to convert ResourceRequest to 
> SchedulingRequest opens up new possibilities for advanced scheduling and 
> placement constraints.



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