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

Daryn Sharp commented on HDFS-12420:
------------------------------------

I'll preface with I think this is inane.  This is like linux having a sysctl 
controlling whether you can use rm -r.

That said, if we really are going to make this change:
* Clarify in the interactive message that all data will be destroyed.  I see 
the patch does that and I think it should be sufficient.  But...
* If there's a conf, "hadoop.is.prod.cluster" is silly.  Call it something more 
like "hdfs.reformat.enabled".
* Instead of a conf, maybe consider the presence of some file in the metadata 
directory as the protection.
* I'd really rather allow -force work otherwise it's not really a force.  If 
you run a "format" command with a "-force" then you made a huge conscious 
decision to wipe your NN.  You can't typo that.

> Disable Namenode format for prod clusters when data already exists
> ------------------------------------------------------------------
>
>                 Key: HDFS-12420
>                 URL: https://issues.apache.org/jira/browse/HDFS-12420
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Ajay Kumar
>            Assignee: Ajay Kumar
>         Attachments: HDFS-12420.01.patch, HDFS-12420.02.patch, 
> HDFS-12420.03.patch, HDFS-12420.04.patch, HDFS-12420.05.patch
>
>
> Disable NameNode format to avoid accidental formatting of Namenode in 
> production cluster. If someone really wants to delete the complete fsImage, 
> they can first delete the metadata dir and then run {code} hdfs namenode 
> -format{code} manually.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to