ConfX created HDFS-17106:
----------------------------

             Summary: NameNode can't successfully launched when set 
dfs.datanode.volumes.replica-add.threadpool.size
                 Key: HDFS-17106
                 URL: https://issues.apache.org/jira/browse/HDFS-17106
             Project: Hadoop HDFS
          Issue Type: Bug
            Reporter: ConfX
         Attachments: reproduce.sh

h2. What happened:

When setting {{dfs.datanode.volumes.replica-add.threadpool.size}} to 0, HDFS 
cluster is never able to start and gets timed out eventually.
h2. Buggy code:

Still investigating
h2. StackTrace:
{noformat}
java.io.IOException: Timed out waiting for Mini HDFS Cluster to start
    at 
org.apache.hadoop.hdfs.MiniDFSCluster.waitClusterUp(MiniDFSCluster.java:1503)
    at 
org.apache.hadoop.hdfs.MiniDFSCluster.initMiniDFSCluster(MiniDFSCluster.java:973)
    at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:576)
    at 
org.apache.hadoop.hdfs.MiniDFSCluster$Builder.build(MiniDFSCluster.java:518)
    at 
org.apache.hadoop.hdfs.server.namenode.metrics.TestNameNodeMetrics.setUp(TestNameNodeMetrics.java:166){noformat}
h2. Reproduce:

(1) Set {{dfs.datanode.volumes.replica-add.threadpool.size}} to 0
(2) Run a simple test that exercises this parameter, e.g. 
{{org.apache.hadoop.hdfs.server.namenode.metrics.TestNameNodeMetrics#testExcessBlocks}}
h2. Solution:

If 0 is not a valid value, then it would be good to have a checker.

For example like {{{}file.bytes-per-checksum{}}}, it has a checker to check it 
must be larger than 0.
{noformat}
Preconditions.checkState(bytesPerChecksum > 0, "bytes per checksum should be 
positive but was %s", bytesPerChecksum);{noformat}
We could have similar checker
{noformat}
Preconditions.checkState(addReplicaThreadPool > 0, "addReplicaThreadPool should 
be positive but was %s", addReplicaThreadPool);{noformat}
For an easy reproduction, run the reproduce.sh in the attachment. We are happy 
to provide a patch if this issue is confirmed.



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

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

Reply via email to