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

   ### Description of PR
   
   Fixes [YARN-12048](https://issues.apache.org/jira/browse/YARN-12048).
   
   Both Federation Router interceptors read the thread-pool keep-alive duration 
in seconds but pass it to `ThreadPoolExecutor` as milliseconds. For example, 
`60s` becomes `60ms`, while `500ms` is truncated to zero. Convert to 
milliseconds when reading the setting, retaining seconds as the default unit 
for values without a suffix.
   
   ### How was this patch tested?
   
   On JDK 17 with Maven 3.9.15:
   
   ```text
   mvn -o -B -pl 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router 
-Dtest=TestFederationInterceptorThreadPool -Dmaven.test.failure.ignore=false 
test
   ```
   
   All 7 tests passed. They cover both interceptors, the `yarn-default.xml` 
value, an absent setting, zero, seconds, minutes, milliseconds, values without 
a suffix, and core-thread-timeout enablement. Restoring the original duration 
conversion caused 5 of the 7 tests to fail; all 7 passed again after restoring 
the fix.
   
   `git diff --check` passed. Checkstyle was compared with the same unmodified 
trunk baseline: 21 existing violations in each, with no new violations.
   
   ### For code changes:
   
   - [x] The PR title starts with the corresponding JIRA issue id.
   - [ ] Object storage integration tests (not applicable).
   - [ ] Dependency licensing (not applicable; no new dependencies).
   - [ ] LICENSE or NOTICE changes (not applicable).
   
   ### AI Tooling
   
   - [x] 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