You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by ch...@huawei.com on 2011/07/13 16:28:47 UTC

Review Request: Potential risk of resource leaks in Hive

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1098/
-----------------------------------------------------------

Review request for hive and John Sichi.


Summary
-------

There are couple of resource leaks.
For example,
In CliDriver.java, Method :- processReader() the buffered reader is not closed.

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


This addresses bug HIVE-1884.
    https://issues.apache.org/jira/browse/HIVE-1884


Diffs
-----

  trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java 1145950 
  trunk/contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableInput.java 1145950 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 1145950 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/io/RCFileInputFormat.java 1145950 

Diff: https://reviews.apache.org/r/1098/diff


Testing
-------

All unit tests passed


Thanks,

chinna


Re: Review Request: Potential risk of resource leaks in Hive

Posted by ch...@huawei.com.

> On 2011-07-18 20:45:08, John Sichi wrote:
> > trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java, line 392
> > <https://reviews.apache.org/r/1098/diff/1/?file=25035#file25035line392>
> >
> >     Rename this to rc to avoid confusion with the processReader method name.

processReader variable name renamed to rc


> On 2011-07-18 20:45:08, John Sichi wrote:
> > trunk/contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableInput.java, line 385
> > <https://reviews.apache.org/r/1098/diff/1/?file=25036#file25036line385>
> >
> >     Fix indentation for the try block.

properly formatted the try block


- chinna


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1098/#review1101
-----------------------------------------------------------


On 2011-07-13 14:28:47, chinna wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/1098/
> -----------------------------------------------------------
> 
> (Updated 2011-07-13 14:28:47)
> 
> 
> Review request for hive and John Sichi.
> 
> 
> Summary
> -------
> 
> There are couple of resource leaks.
> For example,
> In CliDriver.java, Method :- processReader() the buffered reader is not closed.
> 
> Also there are risk(s) of resource(s) getting leaked , in such cases refactored the code to move closing of resources in finally block.
> 
> 
> This addresses bug HIVE-1884.
>     https://issues.apache.org/jira/browse/HIVE-1884
> 
> 
> Diffs
> -----
> 
>   trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java 1145950 
>   trunk/contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableInput.java 1145950 
>   trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 1145950 
>   trunk/ql/src/java/org/apache/hadoop/hive/ql/io/RCFileInputFormat.java 1145950 
> 
> Diff: https://reviews.apache.org/r/1098/diff
> 
> 
> Testing
> -------
> 
> All unit tests passed
> 
> 
> Thanks,
> 
> chinna
> 
>


Re: Review Request: Potential risk of resource leaks in Hive

Posted by John Sichi <js...@fb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1098/#review1101
-----------------------------------------------------------



trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
<https://reviews.apache.org/r/1098/#comment2233>

    Rename this to rc to avoid confusion with the processReader method name.



trunk/contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableInput.java
<https://reviews.apache.org/r/1098/#comment2234>

    Fix indentation for the try block.


- John


On 2011-07-13 14:28:47, chinna wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/1098/
> -----------------------------------------------------------
> 
> (Updated 2011-07-13 14:28:47)
> 
> 
> Review request for hive and John Sichi.
> 
> 
> Summary
> -------
> 
> There are couple of resource leaks.
> For example,
> In CliDriver.java, Method :- processReader() the buffered reader is not closed.
> 
> Also there are risk(s) of resource(s) getting leaked , in such cases refactored the code to move closing of resources in finally block.
> 
> 
> This addresses bug HIVE-1884.
>     https://issues.apache.org/jira/browse/HIVE-1884
> 
> 
> Diffs
> -----
> 
>   trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java 1145950 
>   trunk/contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableInput.java 1145950 
>   trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 1145950 
>   trunk/ql/src/java/org/apache/hadoop/hive/ql/io/RCFileInputFormat.java 1145950 
> 
> Diff: https://reviews.apache.org/r/1098/diff
> 
> 
> Testing
> -------
> 
> All unit tests passed
> 
> 
> Thanks,
> 
> chinna
> 
>