Amith, thanks a lot for working on this issue.
I just reviewed your patch! Some comments:
File base_dir = new File(System.getProperty("test.build.data",
+ "build/test/data"), "dfs/");
can't we use getBaseDirectory from minidfs cluster?
NameNode.format(conf); // Namenode should not format dummy or any other
+ // non file schemes
instead of wrapping the comment into two lines, can we add it above to the foamt call?
+ .println("Storage directory "
+ + dirUri
+ + " is not in file scheme currently formatting is not supported for this scheme");
can you please format this correctly?
System.err.println("Storage directory "
+ " is not in file scheme currently "
+ "formatting is not supported for this scheme");
4) File curDir = new File(dirUri.getPath());
File will take uri also, so need not cnvert it to string right?
5) Also message can be like, 'Formatting supported only for file based storage directories. Current directory scheme is "" . So, ignoring it for format"
6) HATestUtil#setFailoverConfigurations would do almost similar setup as in test. is it possible to use it by passing mock cluster or slightly changed HATestUtil#setFailoverConfigurations?
7)you mean "Could not delete hdfs directory '" -> "Could not delete namespace directory '"
8) testOnlyFileSchemeDirsAreFormatted -> testFormatShouldBeIgnoredForNonFileBasedDirs ?