[ https://issues.apache.org/jira/browse/HDFS-6499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031387#comment-14031387 ]
Aaron T. Myers commented on HDFS-6499: -------------------------------------- The latest patch looks pretty good to me. One small comment: {code} + if (dst.exists()) { + if (!dst.delete()) { + throw new IOException("Couldn't delete " + dst); + } } + NativeIO.renameTo(src, dst); {code} Though this patch has now solved the problem of the rename operation failing without any helpful info, it's still got the problem that the File#delete() call could fail without providing any helpful info. I think this patch is still a net improvement despite this issue, so I'm fine committing it as-is and we can file a follow-up JIRA to improve it further if you'd like. Let me know what you'd like to do, [~yzhangal]. > can't tell why FileJournalManager's call to java.io.File.renameTo() fails > ------------------------------------------------------------------------- > > Key: HDFS-6499 > URL: https://issues.apache.org/jira/browse/HDFS-6499 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode > Affects Versions: 2.4.0 > Reporter: Yongjun Zhang > Assignee: Yongjun Zhang > Attachments: HDFS-6499.001.patch, HDFS-6499.002.patch > > > java.io.File's method renameTo() returns boolean (true for success and false > for failure). If any call to this method failed, the caller can't tell why it > failed. > Filing this jira to address this issue in FileJournalManager by using hadoop > nativeio alternative. -- This message was sent by Atlassian JIRA (v6.2#6252)