hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Andreina (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-3407) When "dfs.datanode.directoryscan.interval" is configured to 0 DN get shutdown but when configured to -1/ less than 0 values directory scan is disabled
Date Fri, 11 May 2012 15:48:50 GMT
J.Andreina created HDFS-3407:

             Summary: When "dfs.datanode.directoryscan.interval" is configured to 0 DN get
shutdown but when configured to -1/ less than 0 values directory scan is disabled
                 Key: HDFS-3407
                 URL: https://issues.apache.org/jira/browse/HDFS-3407
             Project: Hadoop HDFS
          Issue Type: Bug
    Affects Versions: 2.0.0
            Reporter: J.Andreina
            Priority: Minor
             Fix For: 2.0.0, 3.0.0

Scenario 1:

•configure "dfs.datanode.directoryscan.interval"= -1
•start NN and DN
Directory scan will be disabled if we configure a value less than zero. write will be successful
and DN will not be shutdown.
NN logs:
2012-04-24 20:45:48,783 INFO org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl:
Registered FSDatasetState MBean
2012-04-24 20:45:48,787 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Periodic Directory
Tree Verification scan is disabled because verification is turned off by configuration.
2012-04-24 20:45:48,787 INFO org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl:
Adding block pool BP-1927320586-
2012-04-24 20:45:48,874 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Block pool BP-1927320586-
(storage id DS-1680920264- service to HOST-10-18-40-117/
beginning handshake with NN

Scenario 2:

•configure "dfs.datanode.directoryscan.interval"=0
•Start NN and DN
Data node gets shutdown and throws IllegalArgumentException 
java.lang.IllegalArgumentException: n must be positive
	at java.util.Random.nextInt(Random.java:250)
	at org.apache.hadoop.hdfs.server.datanode.DirectoryScanner.start(DirectoryScanner.java:241)
	at org.apache.hadoop.hdfs.server.datanode.DataNode.initDirectoryScanner(DataNode.java:489)
	at org.apache.hadoop.hdfs.server.datanode.DataNode.initPeriodicScanners(DataNode.java:435)
	at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:800)
	at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:308)
	at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:217)
	at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:657)
	at java.lang.Thread.run(Thread.java:619){noformat}
                    DFS_DATANODE_SCAN_PERIOD_HOURS_DEFAULT) < 0) {
      reason = "verification is turned off by configuration";
In the above code instead of checking only for <0 values <=0 can be checked.

Attached the logs for both the scenarios


This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message