Yuan Luo created YARN-12048:
-------------------------------
Summary: Fix keep-alive time units in Federation Router thread
pools
Key: YARN-12048
URL: https://issues.apache.org/jira/browse/YARN-12048
Project: Hadoop YARN
Issue Type: Bug
Components: federation
Reporter: Yuan Luo
h3. Problem
FederationClientInterceptor and FederationRMAdminInterceptor read
yarn.router.interceptor.user-thread-pool.keep-alive-time in seconds, then pass
that value to ThreadPoolExecutor with TimeUnit.MILLISECONDS. A value of 60s
therefore becomes 60ms. Values below one second, such as 500ms, are truncated
to zero before constructing the executor. This affects idle thread retirement
when core thread timeout is enabled.
h3. Solution
Convert the configured duration to milliseconds while retaining seconds as the
default unit for values without a suffix. Apply the same fix to both
interceptors.
h3. Validation
TestFederationInterceptorThreadPool: 7 tests passed on JDK 17. Covers the
yarn-default.xml value, a missing setting, zero, seconds, minutes,
milliseconds, values without a suffix, and core-thread-timeout enablement.
Source baseline: Apache trunk a2d306c65a84bdf11a6eb5251cfff1bfe110546e.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]