-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 0.9.0
-
Component/s: None
-
Labels:None
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'))
else
{ format(dirs[idx]); System.err.println("Formatted "+dirs[idx]); } System.in.read(); // discard the enter-key
}
}
System.exit(aborted ? 1 : 0);
}