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 DDEF0200B88 for ; Fri, 12 Aug 2016 15:29:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DCBBD160AB0; Fri, 12 Aug 2016 13:29:22 +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 1B66E160ABB for ; Fri, 12 Aug 2016 15:29:21 +0200 (CEST) Received: (qmail 15869 invoked by uid 500); 12 Aug 2016 13:29:21 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 15530 invoked by uid 99); 12 Aug 2016 13:29:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2016 13:29:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C04BA2C02AC for ; Fri, 12 Aug 2016 13:29:20 +0000 (UTC) Date: Fri, 12 Aug 2016 13:29:20 +0000 (UTC) From: "Andras Bokor (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-10375) Local FS doesn't raise an error on mkdir() over a file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 12 Aug 2016 13:29:23 -0000 [ https://issues.apache.org/jira/browse/HADOOP-10375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15418829#comment-15418829 ] Andras Bokor commented on HADOOP-10375: --------------------------------------- [~stevel@apache.org], I think it was solved by HADOOP-9361. {code:title=RawLocalFilesystem.java#mkdirsWithOptionalPermission} if (p2f.exists() && !p2f.isDirectory()) { throw new FileNotFoundException("Destination exists" + " and is not a directory: " + p2f.getCanonicalPath()); } {code} Do you agree? > Local FS doesn't raise an error on mkdir() over a file > ------------------------------------------------------ > > Key: HADOOP-10375 > URL: https://issues.apache.org/jira/browse/HADOOP-10375 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 2.3.0 > Reporter: Steve Loughran > Assignee: Andras Bokor > Priority: Minor > > if you mkdir() on a path where there is already a file, the operation does > not fail. Instead the operation returns 0. > This is at odds with the behaviour of HDFS. > HADOOP-6229 add the check for the parent dir not being a file, but something similar is needed for the destination dir itself -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org