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 CD2FE200CC5 for ; Tue, 27 Jun 2017 01:40:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CBCC7160BF8; Mon, 26 Jun 2017 23:40:05 +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 1EE7A160BDE for ; Tue, 27 Jun 2017 01:40:04 +0200 (CEST) Received: (qmail 75222 invoked by uid 500); 26 Jun 2017 23:40:04 -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 75211 invoked by uid 99); 26 Jun 2017 23:40:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2017 23:40:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A60F5C67C8 for ; Mon, 26 Jun 2017 23:40:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.211 X-Spam-Level: X-Spam-Status: No, score=-99.211 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id CUQMHDxANi6L for ; Mon, 26 Jun 2017 23:40:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id D29C25FDAD for ; Mon, 26 Jun 2017 23:40:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D1A58E0D77 for ; Mon, 26 Jun 2017 23:40:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3E4AD24139 for ; Mon, 26 Jun 2017 23:40:00 +0000 (UTC) Date: Mon, 26 Jun 2017 23:40:00 +0000 (UTC) From: "Mingliang Liu (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-14255) S3A to delete unnecessary fake directory objects in mkdirs() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 26 Jun 2017 23:40:06 -0000 [ https://issues.apache.org/jira/browse/HADOOP-14255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16063994#comment-16063994 ] Mingliang Liu commented on HADOOP-14255: ---------------------------------------- Thanks [~stevel@apache.org] for reporting this. Yes that is very related to this patch and we should address that. I filed [HADOOP-14594] and attached a patch file. One change is that, we delete {{destDirDepth - 1}} fake directory object instead of {{destDirDepth}}. > S3A to delete unnecessary fake directory objects in mkdirs() > ------------------------------------------------------------ > > Key: HADOOP-14255 > URL: https://issues.apache.org/jira/browse/HADOOP-14255 > Project: Hadoop Common > Issue Type: Sub-task > Components: fs/s3 > Reporter: Mingliang Liu > Assignee: Mingliang Liu > Fix For: 2.9.0, 3.0.0-alpha4 > > Attachments: HADOOP-14255.000.patch, HADOOP-14255.001.patch > > > In S3AFileSystem, as an optimization, we delete unnecessary fake directory objects if that directory contains at least one (nested) file. That is done in closing stream of newly created file. However, if the directory becomes non-empty after we just create an empty subdirectory, we do not delete its fake directory object though that fake directory object becomes "unnecessary". > So in {{S3AFileSystem::mkdirs()}}, we have a pending TODO: > {quote} > // TODO: If we have created an empty file at /foo/bar and we then call > // mkdirs for /foo/bar/baz/roo what happens to the empty file /foo/bar/? > private boolean innerMkdirs(Path p, FsPermission permission) > {quote} > This JIRA is to fix the TODO: provide consistent behavior for a fake directory object between its nested subdirectory and nested file by deleting it. > See related discussion in [HADOOP-14236]. Thanks [~stevel@apache.org] for discussion. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org