You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Kousuke Saruta (JIRA)" <ji...@apache.org> on 2014/05/27 03:46:02 UTC
[jira] [Updated] (MAPREDUCE-5895) FileAlreadyExistsException was
thrown : Temporary Index File can not be cleaned up because OutputStream
doesn't close properly
[ https://issues.apache.org/jira/browse/MAPREDUCE-5895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kousuke Saruta updated MAPREDUCE-5895:
--------------------------------------
Summary: FileAlreadyExistsException was thrown : Temporary Index File can not be cleaned up because OutputStream doesn't close properly (was: Temporary Index File can not be cleaned up because OutputStream doesn't close properly)
> FileAlreadyExistsException was thrown : Temporary Index File can not be cleaned up because OutputStream doesn't close properly
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: MAPREDUCE-5895
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-5895
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: client
> Affects Versions: 3.0.0
> Reporter: Kousuke Saruta
> Attachments: MAPREDUCE-5895.patch
>
>
> In TaskLog.java, Temporary Index File is created by following code.
> {code}
> BufferedOutputStream bos =
> new BufferedOutputStream(
> SecureIOUtils.createForWrite(tmpIndexFile, 0644));
> DataOutputStream dos = new DataOutputStream(bos);
> {code}
> The code is surrounded by try-finally so if some Exception/ERROR is thrown between constructing bos and dos, temporary file is not cleaned up.
> I met the situation that when a thread ran, OOM was thrown after bos created and temporary file is not cleaned up. At different time, another thread executed same logic and fail because of FileAlreadyExistsException.
--
This message was sent by Atlassian JIRA
(v6.2#6252)