flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4573) Potential resource leak due to unclosed RandomAccessFile in TaskManagerLogHandler
Date Tue, 20 Sep 2016 13:48:20 GMT

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

Ted Yu commented on FLINK-4573:
-------------------------------

Feel free to work on this.

> Potential resource leak due to unclosed RandomAccessFile in TaskManagerLogHandler
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-4573
>                 URL: https://issues.apache.org/jira/browse/FLINK-4573
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>                                                 try {
>                                                         raf = new RandomAccessFile(file,
"r");
>                                                 } catch (FileNotFoundException e) {
>                                                         display(ctx, request, "Displaying
TaskManager log failed.");
>                                                         LOG.error("Displaying TaskManager
log failed.", e);
>                                                         return;
>                                                 }
>                                                 long fileLength = raf.length();
>                                                 final FileChannel fc = raf.getChannel();
> {code}
> If length() throws IOException, raf would be left unclosed.



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

Mime
View raw message