tomscut commented on code in PR #6307:
URL: https://github.com/apache/hadoop/pull/6307#discussion_r1426092305


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/DatanodeHttpServer.java:
##########
@@ -144,7 +146,9 @@ public DatanodeHttpServer(final Configuration conf,
     confForCreate.set(FsPermission.UMASK_LABEL, "000");
 
     this.bossGroup = new NioEventLoopGroup();
-    this.workerGroup = new NioEventLoopGroup();
+    int workerThreads = conf.getInt(DFS_DATANODE_NETTY_WORKER_NUM_THREADS_KEY,
+        DFS_DATANODE_NETTY_WORKER_NUM_THREADS_DEFAULT);
+    this.workerGroup = new NioEventLoopGroup(workerThreads);

Review Comment:
   Better to use a cached thread pool here. like `this.workerGroup = new 
NioEventLoopGroup(workerCount, Executors.newCachedThreadPool())`.



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