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 "Giovanni Matteo Fumarola (JIRA)" <ji...@apache.org> on 2019/04/30 18:41:00 UTC

[jira] [Commented] (HADOOP-16282) AvoidFileStream to improve performance

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

Giovanni Matteo Fumarola commented on HADOOP-16282:
---------------------------------------------------

Thanks [~ayushtkn] for working on this. 

Few questions:
* This change is not clear to me: new PrintStream(new FileOutputStream(new File(filename)), -> new PrintStream(Files.newOutputStream(Paths.get(filename))
* Moving from FileNotFoundException to IOException may have some different results. Can you check if that instruction is the only one that can trigger the exception?

> AvoidFileStream to improve performance
> --------------------------------------
>
>                 Key: HADOOP-16282
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16282
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>         Attachments: HADOOP-16282-01.patch
>
>
> The FileInputStream and FileOutputStream classes contains a finalizer method which will cause garbage collection pauses. See [JDK-8080225|https://bugs.openjdk.java.net/browse/JDK-8080225] for details.
> The FileReader and FileWriter constructors instantiate FileInputStream and FileOutputStream, again causing garbage collection issues while finalizer methods are called.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org