[
https://issues.apache.org/jira/browse/HDFS-11112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15702231#comment-15702231
]
Wei-Chiu Chuang commented on HDFS-11112:
----------------------------------------
I see, [~arpitagarwal]. In that case the patch looks good to me.
> 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
> 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
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]