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

Junping Du commented on MAPREDUCE-6528:
---------------------------------------

Good point, Vinod! Let's keep the patch as it is now as try-with-resources 
won't be supported in earlier version of JDKs.

> Memory leak for HistoryFileManager.getJobSummary()
> --------------------------------------------------
>
>                 Key: MAPREDUCE-6528
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6528
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: jobhistoryserver
>            Reporter: Junping Du
>            Assignee: Junping Du
>            Priority: Critical
>         Attachments: MAPREDUCE-6528.patch
>
>
> We meet memory leak issues for JHS in a large cluster which is caused by code 
> below doesn't release FSDataInputStream in exception case. MAPREDUCE-6273 
> should fix most cases that exceptions get thrown. However, we still need to 
> fix the memory leak for occasional case.
> {code} 
> private String getJobSummary(FileContext fc, Path path) throws IOException {
>     Path qPath = fc.makeQualified(path);
>     FSDataInputStream in = fc.open(qPath);
>     String jobSummaryString = in.readUTF();
>     in.close();
>     return jobSummaryString;
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to