KeeProMise commented on code in PR #7561: URL: https://github.com/apache/hadoop/pull/7561#discussion_r2022093747
########## hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java: ########## @@ -199,8 +199,13 @@ public RouterRpcClient(Configuration conf, Router router, } else { workQueue = new LinkedBlockingQueue<>(); } - this.executorService = new ThreadPoolExecutor(numThreads, numThreads, - 0L, TimeUnit.MILLISECONDS, workQueue, threadFactory); + + if (router.isAsync()) { + this.executorService = null; + } else { + this.executorService = new ThreadPoolExecutor(numThreads, numThreads, + 0L, TimeUnit.MILLISECONDS, workQueue, threadFactory); + } Review Comment: ```java // in RouterRpcClient public void initExecutorService(Conf conf) { int numThreads = conf.getInt( RBFConfigKeys.DFS_ROUTER_CLIENT_THREADS_SIZE, RBFConfigKeys.DFS_ROUTER_CLIENT_THREADS_SIZE_DEFAULT); ThreadFactory threadFactory = new ThreadFactoryBuilder() .setNameFormat("RPC Router Client-%d") .build(); BlockingQueue<Runnable> workQueue; if (conf.getBoolean( RBFConfigKeys.DFS_ROUTER_CLIENT_REJECT_OVERLOAD, RBFConfigKeys.DFS_ROUTER_CLIENT_REJECT_OVERLOAD_DEFAULT)) { workQueue = new ArrayBlockingQueue<>(numThreads); } else { workQueue = new LinkedBlockingQueue<>(); } this.executorService = new ThreadPoolExecutor(numThreads, numThreads, 0L, TimeUnit.MILLISECONDS, workQueue, threadFactory); } // in RouteAsyncRpcClient public void initExecutorService(Conf conf) { } ``` -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org