[ https://issues.apache.org/jira/browse/HDFS-3320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ravi Prakash resolved HDFS-3320. -------------------------------- Resolution: Duplicate Target Version/s: 2.0.0, 3.0.0 (was: 3.0.0, 2.0.0) I filed and patched HDFS-3321 > When dfs.namenode.safemode.min.datanodes is configured there is a mismatch in > UI report > --------------------------------------------------------------------------------------- > > Key: HDFS-3320 > URL: https://issues.apache.org/jira/browse/HDFS-3320 > Project: Hadoop HDFS > Issue Type: Bug > Components: name-node > Affects Versions: 2.0.0, 3.0.0 > Reporter: J.Andreina > Priority: Minor > Labels: newbie > > Scenario 1: > step 1: dfs.namenode.safemode.min.datanodes =2 in hdfs-site.xml > step 2: start NN > Since the datanode threshold is 2 until 2 DN is up NN will not come out of > safemode. > •But in UI report always displays that need additionally (datanodeThreshold - > numLive) + 1 . which can be avoided. > •And "Safe mode will be turned off automatically." message is not required. > because only if the required DN is up it will be turned off > UI report > ========= > "Safe mode is ON. The number of live datanodes 0 needs an additional 3 live > datanodes to reach the minimum number 2. Safe mode will be turned off > automatically." > Scenario :2 > configuring to interger.max value : dfs.namenode.safemode.min.datanodes > =2147483647 > UI report > ======== > "Safe mode is ON. The number of live datanodes 0 needs an additional > -2147483648 live datanodes to reach the minimum number 2147483647. Safe mode > will be turned off automatically." > NN logs: > ======== > 2012-04-24 19:09:33,181 INFO org.apache.hadoop.hdfs.StateChange: STATE* Safe > mode ON. > The number of live datanodes 0 needs an additional -2147483648 live datanodes > to reach the minimum number 2147483647. Safe mode will be turned off > automatically. > Code: > ===== > {noformat} > if (numLive < datanodeThreshold) { > if (!"".equals(msg)) { > msg += "\n"; > } > msg += String.format( > "The number of live datanodes %d needs an additional %d live " > + "datanodes to reach the minimum number %d.", > numLive, (datanodeThreshold - numLive) + 1 , datanodeThreshold); > } > {noformat} > instead of (datanodeThreshold - numLive) + 1 it can be (datanodeThreshold - > numLive). -- 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