flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-2912) Potential resource leak due to unclosed RandomAccessFile in StaticFileServerHandler
Date Sat, 24 Oct 2015 14:18:27 GMT
Ted Yu created FLINK-2912:
-----------------------------

             Summary: Potential resource leak due to unclosed RandomAccessFile in StaticFileServerHandler
                 Key: FLINK-2912
                 URL: https://issues.apache.org/jira/browse/FLINK-2912
             Project: Flink
          Issue Type: Bug
            Reporter: Ted Yu


Here is related code in respondAsLeader():
{code}
    final RandomAccessFile raf;
    try {
      raf = new RandomAccessFile(file, "r");
...
    long fileLength = raf.length();
...
    // write the content.
    ctx.write(new DefaultFileRegion(raf.getChannel(), 0, fileLength), ctx.newProgressivePromise());
{code}
There is no close() call to raf before returning.



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

Mime
View raw message