YARN-11588. [Federation] Fix uncleaned threads in yarn router thread pool executor (#6159) Contributed by Jeffrey Chang.
Reviewed-by: Inigo Goiri <inigoiri@apache.org> Signed-off-by: Shilun Fan <slfan1989@apache.org>
This commit is contained in:
parent
732d4e72a6
commit
bd28ba385a
@ -230,6 +230,9 @@ public void init(String userName) {
|
|||||||
this.executorService = new ThreadPoolExecutor(numMinThreads, numMaxThreads,
|
this.executorService = new ThreadPoolExecutor(numMinThreads, numMaxThreads,
|
||||||
keepAliveTime, TimeUnit.MILLISECONDS, workQueue, threadFactory);
|
keepAliveTime, TimeUnit.MILLISECONDS, workQueue, threadFactory);
|
||||||
|
|
||||||
|
// Adding this line so that unused user threads will exit and be cleaned up if idle for too long
|
||||||
|
this.executorService.allowCoreThreadTimeOut(true);
|
||||||
|
|
||||||
final Configuration conf = this.getConf();
|
final Configuration conf = this.getConf();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user