You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Vinayakumar B (JIRA)" <ji...@apache.org> on 2018/07/12 09:35:00 UTC
[jira] [Comment Edited] (HDFS-11112) Journal Nodes should refuse to
format non-empty directories
[ https://issues.apache.org/jira/browse/HDFS-11112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16541368#comment-16541368 ]
Vinayakumar B edited comment on HDFS-11112 at 7/12/18 9:34 AM:
---------------------------------------------------------------
Should this have been marked incompatible?
I agree that this will avoid accidental deletes.
But still it should be able to format on demand. i.e. When the answer to prompt is 'yes' during reformat. Similar to Namenode dir format.
Namenode calls the JournalNode {{format()}} only after confirmation in the prompt (or "-force") was mentioned.
Ideally, we should be passing on the confirmation of prompt via RPC to JournalNode as well.
was (Author: vinayrpet):
Should this have been marked incompatible?
I agree that this will avoid accidental deletes.
But still it should be able to format on demand. i.e. When the answer to prompt is 'yes' during reformat. Similar to Namenode dir format.
> Journal Nodes should refuse to format non-empty directories
> -----------------------------------------------------------
>
> Key: HDFS-11112
> URL: https://issues.apache.org/jira/browse/HDFS-11112
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Arpit Agarwal
> Assignee: Yiqun Lin
> Priority: Major
> Fix For: 2.9.0, 3.0.0-alpha4
>
> Attachments: HDFS-11112.001.patch, HDFS-11112.002.patch
>
>
> Journal Nodes should reject the {{format}} RPC request if a storage directory is non-empty. The relevant code is in {{JNStorage#format}}.
> {code}
> void format(NamespaceInfo nsInfo) throws IOException {
> setStorageInfo(nsInfo);
> ...
> unlockAll();
> sd.clearDirectory();
> writeProperties(sd);
> createPaxosDir();
> analyzeStorage();
> {code}
> This would make the behavior similar to {{namenode -format -nonInteractive}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org