[ https://issues.apache.org/jira/browse/HDFS-3275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256891#comment-13256891 ]
Uma Maheswara Rao G commented on HDFS-3275: ------------------------------------------- Amith, thanks a lot for working on this issue. I just reviewed your patch! Some comments: 1){quote} File base_dir = new File(System.getProperty("test.build.data", + "build/test/data"), "dfs/"); {quote} can't we use getBaseDirectory from minidfs cluster? 2) {quote} NameNode.format(conf); // Namenode should not format dummy or any other + // non file schemes {quote} instead of wrapping the comment into two lines, can we add it above to the foamt call? 3){code} System.err + .println("Storage directory " + + dirUri + + " is not in file scheme currently formatting is not supported for this scheme"); {code} can you please format this correctly? ex: {code} System.err.println("Storage directory " + " is not in file scheme currently " + "formatting is not supported for this scheme"); {code} 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 "+scheme+" . 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 ? > Format command overwrites contents of non-empty shared edits dir if name dirs > are empty without any prompting > ------------------------------------------------------------------------------------------------------------- > > Key: HDFS-3275 > URL: https://issues.apache.org/jira/browse/HDFS-3275 > Project: Hadoop HDFS > Issue Type: Bug > Components: ha, name-node > Affects Versions: 2.0.0 > Reporter: Vinithra Varadharajan > Assignee: amith > Attachments: HDFS-3275.patch > > > To reproduce: > # Configure a NameNode with namedirs and a shared edits dir, all of which are > empty. > # Run hdfs namenode -format. Namedirs and shared edits dir gets populated. > # Delete the contents of the namedirs. Leave the shared edits dir as is. > Check the timestamps of the shared edits dir contents. > # Run format again. The namedirs as well as the shared edits dir get > formatted. The shared edits dir's contents have been replaced without any > prompting. -- 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