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

Uma Maheswara Rao G commented on HDFS-5721:
-------------------------------------------

{quote}
There are also other places with the similar issues that not get close in 
finally block. i.e. Namenode#Format(), FSNamesystem# loadFromDisk(), etc. I 
think we should fix all these similar issues in one JIRA
{quote}
I agree to close the streams.  Actually in most of this cases, JVM will 
terminate immediately after the command execution (ex: format ..etc). It will 
not run system for log with the leaked streams. But if we face any issue due to 
streams because of not closing them, closing would be fine now. Am i missed 
something here?


> sharedEditsImage in Namenode#initializeSharedEdits() should be closed before 
> method returns
> -------------------------------------------------------------------------------------------
>
>                 Key: HDFS-5721
>                 URL: https://issues.apache.org/jira/browse/HDFS-5721
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>            Priority: Minor
>         Attachments: hdfs-5721-v1.txt, hdfs-5721-v2.txt
>
>
> At line 901:
> {code}
>       FSImage sharedEditsImage = new FSImage(conf,
>           Lists.<URI>newArrayList(),
>           sharedEditsDirs);
> {code}
> sharedEditsImage is not closed before the method returns.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to