hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Tamm (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-5476) calling new SequenceFile.Reader(...) leaves an InputStream open, if the given sequence file is broken
Date Wed, 06 May 2009 22:05:30 GMT

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

Michael Tamm commented on HADOOP-5476:
--------------------------------------

Hmm, that would not cover all error cases:
if a RuntimeException is thrown by seek(start) or init(tempReader),
in would not be closed.

For me it is a best practice to use try-finally to close opened resources.

> calling new SequenceFile.Reader(...) leaves an InputStream open, if the given sequence
file is broken
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-5476
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5476
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.19.1, 0.20.0
>            Reporter: Michael Tamm
>            Assignee: Michael Tamm
>         Attachments: test_and_fix_for_HADOOP-5476.patch, updated_test_and_fix_for_HADOOP-5476.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message