luoyuan3471 opened a new pull request, #8813:
URL: https://github.com/apache/hadoop/pull/8813

   ### Description of PR
   
   YARN-12021 fixes CapacityScheduler queue and partition resource bars 
overflowing their containers when used capacity exceeds 100%.
   
   The web UI previously converted the raw used-capacity ratio directly into 
CSS width, which could produce values such as `width:487.5%`. This patch clamps 
only the visual bar width to the range from 0% to 100% in all four affected 
rendering paths. The actual utilization percentage and the existing 
over-capacity color remain based on the original value, so scheduler and metric 
semantics are unchanged.
   
   A focused unit test covers negative, normal, and over-capacity values.
   
   ### How was this patch tested?
   
   `mvn -pl 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
 -Dtest=TestCapacitySchedulerPage -DskipShade test`
   
   Result: 1 test run, 0 failures, 0 errors, 0 skipped.
   
   `git diff --check`
   
   ### For code changes:
   
   - [x] Does the title of this PR start with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [x] Object storage: Not applicable; this patch does not change an object 
storage connector.
   - [x] No new dependencies are added by this patch.
   - [x] No updates to `LICENSE`, `LICENSE-binary`, or `NOTICE-binary` are 
required.
   
   ### AI Tooling
   
   Contains content generated by Codex.
   
   - [x] The PR includes the phrase "Contains content generated by Codex".
   - [x] My use of AI contributions follows the ASF legal policy: 
https://www.apache.org/legal/generative-tooling.html
   


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