Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EEBAA186C2 for ; Thu, 23 Jul 2015 05:01:04 +0000 (UTC) Received: (qmail 98227 invoked by uid 500); 23 Jul 2015 05:01:04 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 98177 invoked by uid 500); 23 Jul 2015 05:01:04 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 98166 invoked by uid 99); 23 Jul 2015 05:01:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jul 2015 05:01:04 +0000 Date: Thu, 23 Jul 2015 05:01:04 +0000 (UTC) From: "zhihai xu (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HADOOP-12258) Need translate java.nio.file.NoSuchFileException to FileNotFoundException in DeprecatedRawLocalFileStatus constructor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-12258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] zhihai xu updated HADOOP-12258: ------------------------------- Priority: Critical (was: Blocker) > Need translate java.nio.file.NoSuchFileException to FileNotFoundException in DeprecatedRawLocalFileStatus constructor > --------------------------------------------------------------------------------------------------------------------- > > Key: HADOOP-12258 > URL: https://issues.apache.org/jira/browse/HADOOP-12258 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Reporter: zhihai xu > Assignee: zhihai xu > Priority: Critical > > need translate java.nio.file.NoSuchFileException to FileNotFoundException in DeprecatedRawLocalFileStatus constructor. > HADOOP-12045 adds nio to support access time, but nio will create java.nio.file.NoSuchFileException instead of FileNotFoundException. > many hadoop codes depend on FileNotFoundException to decide whether a file exists. for example {{FileContext.util().exists()}}. > {code} > public boolean exists(final Path f) throws AccessControlException, > UnsupportedFileSystemException, IOException { > try { > FileStatus fs = FileContext.this.getFileStatus(f); > assert fs != null; > return true; > } catch (FileNotFoundException e) { > return false; > } > } > {code} > same for {{FileSystem#exists}} > {code} > public boolean exists(Path f) throws IOException { > try { > return getFileStatus(f) != null; > } catch (FileNotFoundException e) { > return false; > } > } > {code} > NoSuchFileException will break these functions. > Several test failures are caused by this issue: > https://builds.apache.org/job/PreCommit-YARN-Build/8630/testReport/org.apache.hadoop.yarn.server.nodemanager/TestDeletionService/testRelativeDelete/ > https://builds.apache.org/job/PreCommit-YARN-Build/8632/testReport/org.apache.hadoop.yarn.server.nodemanager/TestDeletionService/testAbsDelete/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)