This is an automated email from the ASF dual-hosted git repository.

slfan1989 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new bd28ba385a5e YARN-11588. [Federation] Fix uncleaned threads in yarn 
router thread pool executor (#6159) Contributed by Jeffrey Chang.
bd28ba385a5e is described below

commit bd28ba385a5e3163a8ca5d60f322b8c382461b87
Author: jchanggg <jyg.ch...@gmail.com>
AuthorDate: Thu Oct 12 04:13:44 2023 -0700

    YARN-11588. [Federation] Fix uncleaned threads in yarn router thread pool 
executor (#6159) Contributed by Jeffrey Chang.
    
    Reviewed-by: Inigo Goiri <inigo...@apache.org>
    Signed-off-by: Shilun Fan <slfan1...@apache.org>
---
 .../yarn/server/router/clientrm/FederationClientInterceptor.java       | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java
index 63a57394174e..9c3f9971d8c7 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java
@@ -230,6 +230,9 @@ public class FederationClientInterceptor
     this.executorService = new ThreadPoolExecutor(numMinThreads, numMaxThreads,
         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();
 
     try {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to