[ https://issues.apache.org/jira/browse/HADOOP-12258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14694466#comment-14694466 ]
Hudson commented on HADOOP-12258: --------------------------------- FAILURE: Integrated in Hadoop-trunk-Commit #8291 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/8291/]) HADOOP-12258. Need translate java.nio.file.NoSuchFileException to FileNotFoundException to avoid regression. Contributed by Zhihai Xu. (cnauroth: rev 6cc8e38db5b26bdd02bc6bc1c9684db2593eec25) * hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/rawlocal/TestRawlocalContractGetFileStatus.java * hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/contract/hdfs/TestHDFSContractSetTimes.java * hadoop-common-project/hadoop-common/CHANGES.txt * hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractGetFileStatusTest.java * hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractSetTimesTest.java * hadoop-common-project/hadoop-common/src/test/resources/contract/rawlocal.xml * hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/localfs/TestLocalFSContractSetTimes.java * hadoop-hdfs-project/hadoop-hdfs/src/test/resources/contract/hdfs.xml * hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/localfs/TestLocalFSContractGetFileStatus.java * hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/contract/hdfs/TestHDFSContractGetFileStatus.java * hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/ContractOptions.java * hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java * hadoop-common-project/hadoop-common/src/test/resources/contract/localfs.xml * hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/rawlocal/TestRawlocalContractSetTimes.java > Need translate java.nio.file.NoSuchFileException to FileNotFoundException to > avoid regression > --------------------------------------------------------------------------------------------- > > 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 > Fix For: 2.8.0 > > Attachments: HADOOP-12258.000.patch, HADOOP-12258.001.patch, > HADOOP-12258.002.patch > > > need translate java.nio.file.NoSuchFileException to FileNotFoundException to > avoid regression. > 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. > Since {{exists}} is one of the most used API in FileSystem, this issue is > very critical. > Several test failures for TestDeletionService 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)