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 ABADF200C68 for ; Wed, 3 May 2017 20:23:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AA5F2160BA1; Wed, 3 May 2017 18:23:10 +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 EF8CA160BBA for ; Wed, 3 May 2017 20:23:09 +0200 (CEST) Received: (qmail 97846 invoked by uid 500); 3 May 2017 18:23:09 -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 97834 invoked by uid 99); 3 May 2017 18:23:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 May 2017 18:23:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 71355C06D2 for ; Wed, 3 May 2017 18:23:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id OZ5DDLvGPKaS for ; Wed, 3 May 2017 18:23:06 +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 988275FCDA for ; Wed, 3 May 2017 18:23:05 +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 EABA3E0D5C for ; Wed, 3 May 2017 18:23:04 +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 4D18421DF1 for ; Wed, 3 May 2017 18:23:04 +0000 (UTC) Date: Wed, 3 May 2017 18:23:04 +0000 (UTC) From: "Steve Loughran (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-14365) Stabilise FileSystem builder-based create API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 03 May 2017 18:23:10 -0000 [ https://issues.apache.org/jira/browse/HADOOP-14365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995378#comment-15995378 ] Steve Loughran commented on HADOOP-14365: ----------------------------------------- well, it went back in to 2.9; I don't want it reaching the outside world until we are happy. Ideally it wouldn't be on branch-2 yet, but it's been checked in there. hence me tagging it as a blocker. Given its currently about EC, perhaps the good strategy would be to revert from branch-2, stabilise in trunk & then backport. Thinking about implementation, I'd concluded that for the generic ones, we could just have a Configuration behind the scenes, some limited setters on the stream builder would let us set generic options, and I could even use the same naming scheme "fs.s3a..." for scheme-specific opts. I haven't started work, its more something I'd like the authors of the original code to round off: the little details of the API. I'll do my best to provide constructive reviews & help with testing > Stabilise FileSystem builder-based create API > ---------------------------------------------- > > Key: HADOOP-14365 > URL: https://issues.apache.org/jira/browse/HADOOP-14365 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 2.9.0 > Reporter: Steve Loughran > Assignee: Lei (Eddy) Xu > Priority: Blocker > > HDFS-11170 added a builder-based create API for file creation which has a few issues to work out before it can be considered ready for use > 1. There no specification in the filesystem.md of what it is meant to do, which means there's no public documentation on expected behaviour except on the Javadocs, which consists of the sentences "Create a new FSDataOutputStreamBuilder for the file with path" and "Base of specific file system FSDataOutputStreamBuilder". > I propose: > # Give the new method a relevant name rather than just define the return type, e.g. {{createFile()}}. > # `Filesystem.md` to be extended with coverage of this method, and, sadly for the authors, coverage of what the semantics of {{FSDataOutputStreamBuilder.build()}} are. > 2. There are only tests for HDFS and local, neither of them perfect. Proposed: move to {{AbstractContractCreateTest}}, test for all filesystems, fix tests and FS where appropriate. > 3. Add more tests to generate the failure conditions implied by the updated filesystem spec. Eg. create over a an existing file, create over a directory, create with negative buffer size, negative block size, empty dest path, etc, etc. > This will clarify when precondition checks are made, as well as whether. For example: should {{newFSDataOutputStreamBuilder()}} validate the path immediately? > 4. Add to {{FileContext}}. > 5. Take the opportunity to look at the flaws in today's {{create()}} calls and address them, rather than replicate. In particular, I'd like to end the behaviour "create all parent dirs. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org