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

ASF GitHub Bot commented on FLINK-4910:
---------------------------------------

Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2691#discussion_r85330501
  
    --- Diff: flink-core/src/main/java/org/apache/flink/util/IOUtils.java ---
    @@ -213,6 +214,16 @@ public static void closeSocket(final Socket sock) {
                        }
                }
        }
    +
    +   public static void closeQuietly(Closeable closeable) {
    +           try {
    +                   if (closeable != null) {
    +                           closeable.close();
    +                   }
    +           } catch (IOException silent) {
    --- End diff --
    
    We typically call ignored exceptions `ignored` - that also makes IntelliJ 
not warn about ignoring them (if you have the inspection active)


> Introduce safety net for closing file system streams
> ----------------------------------------------------
>
>                 Key: FLINK-4910
>                 URL: https://issues.apache.org/jira/browse/FLINK-4910
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Stefan Richter
>            Assignee: Stefan Richter
>
> Streams that are opened through {{FileSystem}} must be closed at the end of 
> their life cycle. However, we found hints that some code forgets to close 
> such streams.
> We should introduce i) a mechanism that closes leaking unclosed streams after 
> usage and ii) provides logging that helps us to track down and fi the sources 
> of such leaks.



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

Reply via email to