[ http://issues.apache.org/jira/browse/HADOOP-682?page=all ]
Doug Cutting updated HADOOP-682: -------------------------------- Status: Resolved (was: Patch Available) Fix Version/s: 0.9.0 Resolution: Fixed I just committed this. Thanks, Sanjay! > hadoop namenode -format doesnt work anymore if target directory doesnt exist > ---------------------------------------------------------------------------- > > Key: HADOOP-682 > URL: http://issues.apache.org/jira/browse/HADOOP-682 > Project: Hadoop > Issue Type: Bug > Components: dfs > Reporter: Sanjay Dahiya > Fix For: 0.9.0 > > Attachments: Hadoop-682.patch > > > Not sure if this was intended, but hadoop namenode -format doesnt work > anymore if the target directory doesnt exist due to the check in the > NameNode.main(). It used to work earlier > if (argv.length == 1 && argv[0].equals("-format")) { > boolean aborted = false; > File[] dirs = getDirs(conf); > for (int idx = 0; idx < dirs.length; idx++) { > if (dirs[idx].exists()) { <<<====== if dir > doesnt exist it won't format > System.err.print("Re-format filesystem in " + dirs[idx] +" ? (Y > or N) "); > if (!(System.in.read() == 'Y')) { > System.err.println("Format aborted in "+ dirs[idx]); > aborted = true; > } else { > format(dirs[idx]); > System.err.println("Formatted "+dirs[idx]); > } > System.in.read(); // discard the enter-key > } > } > System.exit(aborted ? 1 : 0); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira