hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arpit Agarwal (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12420) Disable Namenode format for prod clusters when data already exists
Date Fri, 22 Sep 2017 21:50:00 GMT

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

Arpit Agarwal commented on HDFS-12420:
--------------------------------------

Couple of comments:
# The setting description looks incorrect in hdfs-default.xml.
# In testNNFormatSuccess test case, the following lines are redundant:
{code}
    FSNamesystem fsn = FSNamesystem.loadFromDisk(config);

    doAnEdit(fsn, 1);
    doAnEdit(fsn, 2);
    assertEquals(3, fsn.getEditLog().getLastWrittenTxId());

    config.setBoolean(DFSConfigKeys.DFS_REFORMAT_ENABLED, false);
    DFSTestUtil.formatNameNode(config);
{code}
Instead we can disable reformat before the first format attempt. This will become the regression
test.
# We don't need to call {{deleteNameDirs}} since the {{@After}} method does 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, HDFS-12420.06.patch, HDFS-12420.07.patch, HDFS-12420.08.patch
>
>
> Support for disabling 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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message