hfutatzhanghb commented on code in PR #7561:
URL: https://github.com/apache/hadoop/pull/7561#discussion_r2022096675


##########
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:
   @KeeProMise  Thanks very much for this nice suggestion. It looks better and 
i will optimize this PR base on your advise.



-- 
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