[
https://issues.apache.org/jira/browse/HADOOP-7478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068628#comment-13068628
]
Eli Collins commented on HADOOP-7478:
-------------------------------------
It doesn't seem like FileUtil#copy should always delete the destination if
there's an IOE doing the copy. For example, what if there's an error reading
the source, overwrite is true, and the dest exists. We will have removed the
dest but not necessarily replaced it with a new file, ie copy(x, y) should
never result in y not existing right? Please add tests that cover the current
behavior (what happens when there's an IOE during copy) so we can see how the
tests modify the behavior.
> 0-byte files retained in the dfs while the FSshell -put is unsuccessful
> -----------------------------------------------------------------------
>
> Key: HADOOP-7478
> URL: https://issues.apache.org/jira/browse/HADOOP-7478
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: XieXianshan
> Assignee: XieXianshan
> Priority: Trivial
> Attachments: HADOOP-7478.patch
>
>
> The process of putting file into dfs is approximately as follows:
> 1) create a file in the dfs
> 2) copy from one stream to the file
> But the problem is that the file is still retained in the dfs when the
> process 2) is terminated abnormally with unexpected exceptions,such as there
> is no DataNode alive.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira