hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron T. Myers (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3275) Format command overwrites contents of non-empty shared edits dir if name dirs are empty without any prompting
Date Tue, 24 Apr 2012 05:49:40 GMT

    [ https://issues.apache.org/jira/browse/HDFS-3275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13260243#comment-13260243
] 

Aaron T. Myers commented on HDFS-3275:
--------------------------------------

Patch looks pretty good to me. Just a few little comments. +1 once these are addressed:

# Don't declare the "DEFAULT_SCHEME" constant in the NameNode class. Instead, use the NNStorage.LOCAL_URI_SCHEME
constant, which is used in FSEditLog to identify local edits logs.
# I think it's better to include the URI of the dir we're skipping, and the scheme we expect.
So, instead of this:
{code}
System.err.println("Formatting supported only for file based storage"
  + " directories. Current directory scheme is \""
  + dirUri.getScheme() + "\". So, ignoring it for format");
{code}
How about something like this:
{code}
System.err.println("Skipping format for directory \"" + dirUri
  + "\". Can only format local directories with scheme \""
  + NNStorage.LOCAL_URI_SCHEME + "\".");
{code}
# {{"supported for" + dirUri;}} - put a space after "for"
# Odd javadoc formatting, and typo "with out" -> "without":
{code}
+  /** Sets the required configurations for performing failover.
+   *  with out any dependency on MiniDFSCluster
+   *  */
{code}
# Recommend adding a comment to the assert in NameNode#confirmFormat that the presence of
the assert is necessary for the validity of the test.
                
> 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
>             Fix For: 3.0.0
>
>         Attachments: HDFS-3275.patch, HDFS-3275_1.patch, HDFS-3275_1.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

        

Mime
View raw message