[ https://issues.apache.org/jira/browse/HDFS-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14037732#comment-14037732 ]
Chris Nauroth commented on HDFS-6531: ------------------------------------- Linking to HADOOP-9590, which tracks our use cases for calling the new file APIs introduced in JDK7. With JDK7, we could potentially use {{Files#delete}}, which throws an exception with details if the delete fails. This would reduce our native code footprint. http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#delete(java.nio.file.Path) > Create a native api to delete file, like the renameTo method in NativeIO, for > better error reporting > ---------------------------------------------------------------------------------------------------- > > Key: HDFS-6531 > URL: https://issues.apache.org/jira/browse/HDFS-6531 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 2.4.0 > Reporter: Yongjun Zhang > Assignee: Yongjun Zhang > > File.delete() returns boolean to indicate success or failure. > As a follow-up of HDFS-6499, filing this jira to provide a native API to > delete file, like the renameTo method in NativeIO. So caller can tell better > what's the reason of failure. > And fix FileJournalManager etc places for better error reporting. > Thanks [~atm] for reviewing the fix of HDFS-6499 and pointing out this issue. -- This message was sent by Atlassian JIRA (v6.2#6252)