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

ayushsaxena 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 c2a1765  HDFS-15443. Setting dfs.datanode.max.transfer.threads to a 
very small value can cause strange failure. Contributed by AMC-team.
c2a1765 is described below

commit c2a17659d1d48407edf437131783b653dbc87bc1
Author: Ayush Saxena <[email protected]>
AuthorDate: Sat Aug 8 14:33:53 2020 +0530

    HDFS-15443. Setting dfs.datanode.max.transfer.threads to a very small value 
can cause strange failure. Contributed by AMC-team.
---
 .../java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java
index 7faf210..43d292c 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java
@@ -188,6 +188,9 @@ class DataXceiverServer implements Runnable {
     this.maxXceiverCount =
       conf.getInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY,
                   DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_DEFAULT);
+    Preconditions.checkArgument(this.maxXceiverCount >= 1,
+        DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY +
+        " should not be less than 1.");
 
     this.estimateBlockSize = 
conf.getLongBytes(DFSConfigKeys.DFS_BLOCK_SIZE_KEY,
         DFSConfigKeys.DFS_BLOCK_SIZE_DEFAULT);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to