You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2016/02/29 16:53:18 UTC

[jira] [Commented] (HADOOP-12856) FileUtil.checkDest() to throw PathExistsException and PathIsDirectoryException when appropriate

    [ https://issues.apache.org/jira/browse/HADOOP-12856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15172039#comment-15172039 ] 

Steve Loughran commented on HADOOP-12856:
-----------------------------------------

This is what the new stack trace would look like
{code}
org.apache.hadoop.fs.PathIsDirectoryException: `file:/tmp/ats/done/1111/0000/000/application_1111_0000/application_1111_0000': Is a directory
	at org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:503)
	at org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:505)
	at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:351)
	at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:341)
	at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:292)
	at org.apache.hadoop.fs.RawLocalFileSystem.rename(RawLocalFileSystem.java:366)
	at org.apache.hadoop.fs.ChecksumFileSystem.rename(ChecksumFileSystem.java:507)
	at org.apache.hadoop.yarn.server.timeline.EntityGroupFSTimelineStore$AppLogs.moveToDone(EntityGroupFSTimelineStore.java:694)
	at org.apache.hadoop.yarn.server.timeline.EntityGroupFSTimelineStore$ActiveLogParser.run(EntityGroupFSTimelineStore.java:751)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
{code}

> FileUtil.checkDest() to throw PathExistsException and PathIsDirectoryException when appropriate
> -----------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-12856
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12856
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 2.8.0
>            Reporter: Steve Loughran
>
> {{FileUtil.checkDest()}} throws IOEs when its conditions are not met, with meaningful text.
> The code could be improved if it were to throw {{PathExistsException}} and {{PathIsDirectoryException}} when appropriate



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)