TaoYang526 opened a new pull request, #7448:
URL: https://github.com/apache/hadoop/pull/7448
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
Details:
* Dynamic Request Handling: The RequestsHandler class has been added to
handle and modify resource and scheduling requests at the beginning of the
CapacityScheduler#allocate method.
* Configuration-Driven Updates: The behavior of the request handler can be
configured dynamically via capacity-scheduler.xml configuration, allowing for
updates to be applied without restarting the ResourceManager.
* Scriptable Matching: Requests can be matched and modified based on
JavaScript expressions, providing flexibility in defining which requests should
be updated and how.
* Support for ResourceRequest to SchedulingRequest Conversion: The handler
supports converting ResourceRequest objects to SchedulingRequest objects,
enabling more advanced scheduling capabilities.
Usage: To enable and configure the request handler, administrators can set
the following properties in capacity-scheduler.xml:
yarn.scheduler.capacity.request-handler.enabled: Enables or disables the
request handler.
yarn.scheduler.capacity.request-handler.updates: Specifies the JSON
configuration for the request updates.
Configuration example:
```xml
<property>
<name>yarn.scheduler.capacity.request-handler.enabled</name>
<value>true</value>
</property>
<property>
<name>yarn.scheduler.capacity.request-handler.updates</name>
<value>
{
"items": [
{
"appMatchExpr": "queue == 'default'",
"requestMatchExpr": "priority > 10",
"isRRToSR": true,
"partition": "partitionA",
"executionType": "GUARANTEED",
"allocationTags": ["tag1", "tag2"],
"placementConstraint": "and(in,rack,hbase:notin,node,zk)"
}
]
}
</value>
</property>
```
### How was this patch tested?
### For code changes:
- [x] 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](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
--
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]