[ 
https://issues.apache.org/jira/browse/HDFS-17254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17883462#comment-17883462
 ] 

ASF GitHub Bot commented on HDFS-17254:
---------------------------------------

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


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/DatanodeHttpServer.java:
##########
@@ -144,7 +147,16 @@ public DatanodeHttpServer(final Configuration conf,
     confForCreate.set(FsPermission.UMASK_LABEL, "000");
 
     this.bossGroup = new NioEventLoopGroup();
-    this.workerGroup = new NioEventLoopGroup();
+    int workerCount = conf.getInt(DFS_DATANODE_NETTY_WORKER_NUM_THREADS_KEY,
+        DFS_DATANODE_NETTY_WORKER_NUM_THREADS_DEFAULT);
+    if (workerCount < 0) {
+      LOG.warn("The value of " +
+          DFS_DATANODE_NETTY_WORKER_NUM_THREADS_KEY + " is less than 0, will 
use default value: " +
+          DFS_DATANODE_NETTY_WORKER_NUM_THREADS_DEFAULT);
+      workerCount = DFS_DATANODE_NETTY_WORKER_NUM_THREADS_DEFAULT;

Review Comment:
   Use logger format {} instead of concat





> DataNode httpServer has too many worker threads
> -----------------------------------------------
>
>                 Key: HDFS-17254
>                 URL: https://issues.apache.org/jira/browse/HDFS-17254
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>            Reporter: Liangjun He
>            Assignee: Liangjun He
>            Priority: Minor
>              Labels: pull-request-available
>
> When optimizing the thread number of high-density storage DN, we found the 
> number of worker threads for the DataNode httpServer is twice the number of 
> available cores on node , resulting in too many threads. We can change this 
> to be configurable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to