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 8B9B4200D2B for ; Thu, 2 Nov 2017 20:47:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8A0C41609EB; Thu, 2 Nov 2017 19:47:06 +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 D0FCF160BE5 for ; Thu, 2 Nov 2017 20:47:05 +0100 (CET) Received: (qmail 23634 invoked by uid 500); 2 Nov 2017 19:47:04 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 23256 invoked by uid 99); 2 Nov 2017 19:47: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; Thu, 02 Nov 2017 19:47: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 B8C26D9FF6 for ; Thu, 2 Nov 2017 19:47:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id hPsvrsnnCoF2 for ; Thu, 2 Nov 2017 19:47:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 6D08B6112D for ; Thu, 2 Nov 2017 19:47:02 +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 885D6E05C1 for ; Thu, 2 Nov 2017 19:47:01 +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 61B492415B for ; Thu, 2 Nov 2017 19:47:00 +0000 (UTC) Date: Thu, 2 Nov 2017 19:47:00 +0000 (UTC) From: "Mukul Kumar Singh (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-12768) Ozone: Qualify OzoneFileSystem paths in Filesystem APIs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Nov 2017 19:47:06 -0000 Mukul Kumar Singh created HDFS-12768: ---------------------------------------- Summary: Ozone: Qualify OzoneFileSystem paths in Filesystem APIs Key: HDFS-12768 URL: https://issues.apache.org/jira/browse/HDFS-12768 Project: Hadoop HDFS Issue Type: Sub-task Components: ozone Affects Versions: HDFS-7240 Reporter: Mukul Kumar Singh Assignee: Mukul Kumar Singh Priority: Major Fix For: HDFS-7240 This is based on [~stevel@apache.org]'s comments on HDFS-7240. This jira will be used to qualify filesystem paths before they are used, this jira will also address rest of the review comments for filesystem api as well. General 1) various places use LOG.info("text " + something). they should all move to LOG.info("text {}", something) 2) Once OzoneException -> IOE, you can cut the catch and translate here. 3) qualify path before all uses. That's needed to stop them being relative, and to catch things like someone calling ozfs.rename("o3://bucket/src", "s3a://bucket/dest"), delete("s3a://bucket/path"), etc, as well as problems with validation happening before paths are made absolute. 4) RenameIterator.iterate() it's going to log @ warn whenever it can't delete a temp file because it doesn't exist, which may be a distraction in failures. Better: if(!tmpFile.delete() && tmpFile.exists()), as that will only warn if the temp file is actually there. OzoneFileSystem.rename(). 1) Qualify all the paths before doing directory validation. Otherwise you can defeat the "don't rename into self checks" rename("/path/src", "/path/../path/src/dest"). 2) Log @ debu all the paths taken before returning so you can debug if needed. 3) S3A rename ended up having a special RenameFailedException() which innerRename() raises, with text and return code. Outer rename logs the text and returns the return code. This means that all failing paths have an exception clearly thrown, and when we eventually make rename/3 public, it's lined up to throw exceptions back to the caller. Consider copying this code. OzoneFileSystem.delete 1) qualify path before use 2) dont' log at error if you can't delete a nonexistent path, it is used everywhere for silent cleanup. Cut it OzoneFileSystem.ListStatusIterator 1) make status field final OzoneFileSystem.mkdir 1) do qualify path first. OzoneFileSystem.getFileStatus 1) getKeyInfo() catches all exceptions and maps to null, which is interpreted not found and eventually surfaces as FNFE. This is misleading if the failure is for any other reason. 2) Once OzoneException -> IOException, getKeyInfo() should only catch & downgrade the explicit not found (404?) responses. OzoneFileSystem.listKeys() unless this needs to be tagged as VisibleForTesting, make private. OzoneFileSystem.getDefaultBlockSize() implement getDefaultBlockSize(); add a config option to let people set it. add a sensible default like 64 or 128 MB. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org