hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohit Sikri (JIRA)" <>
Subject [jira] Created: (HIVE-1884) Potential risk of resource leaks in Hive
Date Wed, 05 Jan 2011 09:53:46 GMT
Potential risk of resource leaks in Hive

                 Key: HIVE-1884
             Project: Hive
          Issue Type: Bug
    Affects Versions: 0.6.0
         Environment: Hive 0.6.0, Hadoop 0.20.1

SUSE Linux Enterprise Server 11 (i586)
            Reporter: Mohit Sikri

h3.There are couple of resource leaks.
h4.For example,

In, Method :- processReader() the buffered reader is not closed.

h3.Also there are risk(s) of  resource(s) getting leaked , in such cases we need to re factor
the code to move closing of resources in finally block.

h4. For Example :- 

In   Method:- checkJobTracker() , the following code snippet might cause resource

InputStream in = url.openStream();;

Ideally and as per the best coding practices it should be like below


InputStream in=null;
try   {
        in = url.openStream();
        int numRead =;
finally {


Similar cases, were found in, etc.Need to re factor all such

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

View raw message