hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ayush Saxena (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-16282) AvoidFileStream to improve performance
Date Tue, 30 Apr 2019 19:06:00 GMT

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

Ayush Saxena commented on HADOOP-16282:

Thanx [~giovanni.fumarola] for review.
{quote}(new FileOutputStream(new File(filename)), -> new PrintStream(Files.newOutputStream(Paths.get(filename))
Here first file was required as input but for the latter only path is required, So Instead
of converting to file and then getting the path I directly took the path from file.

{quote}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?

 I checked the javadoc, and tried searching a bit, but there isn't any discrete confirmation,
that I can take upon and guarantee on the fact. 
 Should I take those Exception changed changes?
 it had a mention [here|https://pmd.github.io/latest/pmd_rules_java_performance.html#avoidfilestream]

Let me know ur opinion, will update accordingly:)


> 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

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

View raw message