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

Walter Su commented on HADOOP-18313:
------------------------------------

It's used in AliyunOSSFileSystem which is a FileSystem extension. It's not 
always runs inside YARN container. I think write temp file under hadoop.tmp.dir 
is reasonable. S3AFileSystem also writes under hadoop.tmp.dir.
AliyunOSSBlockOutputStream removes the temp file when close() is called, I 
think we can remove the shutdown hook.
+1 LGTM.

> AliyunOSS: AliyunOSSBlockOutputStream should not mark the temporary file for 
> deletion
> -------------------------------------------------------------------------------------
>
>                 Key: HADOOP-18313
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18313
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/oss
>    Affects Versions: 2.10.2, 3.2.3, 3.3.3
>            Reporter: wujinhu
>            Assignee: wujinhu
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> AliyunOSSBlockOutputStream buffers data in local directory before uploading 
> to OSS. It uses LocalDirAllocator.createTmpFileForWrite which will create a 
> temp file on this directory and invoke DeleteOnExitHook.add to add the path 
> to a set and will be deleted on VM exit through a shutdown hook. However, the 
> size of set will be growing if the VM does not exit.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to