Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 786DE200BEB for ; Tue, 22 Nov 2016 18:57:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 772BC160AF1; Tue, 22 Nov 2016 17:57:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E9357160B1E for ; Tue, 22 Nov 2016 18:56:59 +0100 (CET) Received: (qmail 72493 invoked by uid 500); 22 Nov 2016 17:56:59 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 72419 invoked by uid 99); 22 Nov 2016 17:56:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2016 17:56:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EF37A2C002A for ; Tue, 22 Nov 2016 17:56:58 +0000 (UTC) Date: Tue, 22 Nov 2016 17:56:58 +0000 (UTC) From: "Arpit Agarwal (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-11112) Journal Nodes should refuse to format non-empty directories MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 22 Nov 2016 17:57:00 -0000 [ https://issues.apache.org/jira/browse/HDFS-11112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15687419#comment-15687419 ] Arpit Agarwal commented on HDFS-11112: -------------------------------------- Sorry I couldn't respond earlier. [~jojochuang] that is correct, if the format request comes in via RPC then the JN skips the check for non-empty directories. > 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: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org