[jira] [Commented] (HIVE-1884) Potential risk of resource leaks in Hive

2011-05-19 Thread jirapos...@reviews.apache.org (JIRA)

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

jirapos...@reviews.apache.org commented on HIVE-1884:
-


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

Review request for hive.


Summary
---

Potential risk of resource leaks in Hive


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 1124130 
  
trunk/contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableInput.java
 1124130 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 1124130 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/io/RCFileInputFormat.java 1124130 

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


Testing
---

All tests passed


Thanks,

chinna



> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Chinna Rao Lalam
> Attachments: HIVE-1884.1.PATCH, HIVE-1884.2.patch
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-1884) Potential risk of resource leaks in Hive

2011-07-09 Thread Chinna Rao Lalam (JIRA)

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

Chinna Rao Lalam commented on HIVE-1884:


patch is rebased against trunk.

> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Chinna Rao Lalam
> Attachments: HIVE-1884.1.PATCH, HIVE-1884.2.patch, HIVE-1884.3.patch
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (HIVE-1884) Potential risk of resource leaks in Hive

2011-07-12 Thread Chinna Rao Lalam (JIRA)

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

Chinna Rao Lalam commented on HIVE-1884:


 This one has gone stale again... i will rebase against trunk and i will open a 
Review Board request

> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Chinna Rao Lalam
> Attachments: HIVE-1884.1.PATCH, HIVE-1884.2.patch, HIVE-1884.3.patch
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (HIVE-1884) Potential risk of resource leaks in Hive

2011-07-13 Thread jirapos...@reviews.apache.org (JIRA)

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

jirapos...@reviews.apache.org commented on HIVE-1884:
-


---
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



> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Chinna Rao Lalam
> Attachments: HIVE-1884.1.PATCH, HIVE-1884.2.patch, HIVE-1884.3.patch, 
> HIVE-1884.4.patch
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (HIVE-1884) Potential risk of resource leaks in Hive

2011-07-13 Thread Chinna Rao Lalam (JIRA)

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

Chinna Rao Lalam commented on HIVE-1884:


Open a Review Board request

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

> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Chinna Rao Lalam
> Attachments: HIVE-1884.1.PATCH, HIVE-1884.2.patch, HIVE-1884.3.patch, 
> HIVE-1884.4.patch
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (HIVE-1884) Potential risk of resource leaks in Hive

2011-07-18 Thread jirapos...@reviews.apache.org (JIRA)

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

jirapos...@reviews.apache.org commented on HIVE-1884:
-


---
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


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


Fix indentation for the try block.


- John


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



> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Chinna Rao Lalam
> Attachments: HIVE-1884.1.PATCH, HIVE-1884.2.patch, HIVE-1884.3.patch, 
> HIVE-1884.4.patch
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (HIVE-1884) Potential risk of resource leaks in Hive

2011-07-19 Thread jirapos...@reviews.apache.org (JIRA)

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

jirapos...@reviews.apache.org commented on HIVE-1884:
-



bq.  On 2011-07-18 20:45:08, John Sichi wrote:
bq.  > trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java, line 392
bq.  > 
bq.  >
bq.  > Rename this to rc to avoid confusion with the processReader method 
name.

processReader variable name renamed to rc


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



> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Chinna Rao Lalam
> Attachments: HIVE-1884.1.PATCH, HIVE-1884.2.patch, HIVE-1884.3.patch, 
> HIVE-1884.4.patch, HIVE-1884.5.patch
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (HIVE-1884) Potential risk of resource leaks in Hive

2011-07-19 Thread John Sichi (JIRA)

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

John Sichi commented on HIVE-1884:
--

+1.  Will commit when tests pass.

> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Chinna Rao Lalam
> Attachments: HIVE-1884.1.PATCH, HIVE-1884.2.patch, HIVE-1884.3.patch, 
> HIVE-1884.4.patch, HIVE-1884.5.patch
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (HIVE-1884) Potential risk of resource leaks in Hive

2011-07-20 Thread Hudson (JIRA)

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

Hudson commented on HIVE-1884:
--

Integrated in Hive-trunk-h0.21 #837 (See 
[https://builds.apache.org/job/Hive-trunk-h0.21/837/])
HIVE-1884. Potential risk of resource leaks in Hive
(Chinna Rao Lalam via jvs)

jvs : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1148921
Files : 
* /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/RCFileInputFormat.java
* 
/hive/trunk/contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableInput.java
* /hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
* /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java


> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Chinna Rao Lalam
> Fix For: 0.8.0
>
> Attachments: HIVE-1884.1.PATCH, HIVE-1884.2.patch, HIVE-1884.3.patch, 
> HIVE-1884.4.patch, HIVE-1884.5.patch
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (HIVE-1884) Potential risk of resource leaks in Hive

2011-09-08 Thread Florin Diaconeasa (JIRA)

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

Florin Diaconeasa commented on HIVE-1884:
-

Hello,

Could this lead to input files being ignored?

We have a query in which we are doing several "UNION ALL". Apparently, 
sometimes Hive ignores one of the SELECTs. Actually not sure if it ignores the 
SELECT or it doesn't see the input files for that select. There are 6 queries 
which are united using UNION ALL.

This happened several times with different SELECTs from that big query and the 
query i valid. This leads me to think it's either related to this issue or a 
memory leak.

Setup: Hadoop 0.20.1, Hive 0.6, Debian 5.0 x64

Thank you,

Flo

> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Chinna Rao Lalam
> Fix For: 0.8.0
>
> Attachments: HIVE-1884.1.PATCH, HIVE-1884.2.patch, HIVE-1884.3.patch, 
> HIVE-1884.4.patch, HIVE-1884.5.patch
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (HIVE-1884) Potential risk of resource leaks in Hive

2011-09-08 Thread Florin Diaconeasa (JIRA)

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

Florin Diaconeasa commented on HIVE-1884:
-

Hive is running in server mode as daemon.

> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Chinna Rao Lalam
> Fix For: 0.8.0
>
> Attachments: HIVE-1884.1.PATCH, HIVE-1884.2.patch, HIVE-1884.3.patch, 
> HIVE-1884.4.patch, HIVE-1884.5.patch
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (HIVE-1884) Potential risk of resource leaks in Hive

2011-01-05 Thread Ashutosh Chauhan (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977889#action_12977889
 ] 

Ashutosh Chauhan commented on HIVE-1884:


Good work Mohit to identify these potential resource leaks. How did you find 
these leaks? Through manual code inspection or through some tool/lib ? Looks 
like later.

> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/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 CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

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



[jira] Commented: (HIVE-1884) Potential risk of resource leaks in Hive

2011-01-05 Thread Mohit Sikri (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978118#action_12978118
 ] 

Mohit Sikri commented on HIVE-1884:
---

Thanks Ashutosh, well it is both ways, team review and couple of static 
analysis tools, I will work on it and provide the patch.

> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/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 CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

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



[jira] Commented: (HIVE-1884) Potential risk of resource leaks in Hive

2011-01-24 Thread Namit Jain (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985830#action_12985830
 ] 

Namit Jain commented on HIVE-1884:
--

I am not surprised - I am not aware of any long hive server deployment, so this 
code patch has not been tested at all.

Do you want to add a stress test, which runs for a long time: say 10 hours or 
so ?
It may not be practical to run it before every commit - but we can schedule it 
on hudson, and monitor the results there

> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Mohit Sikri
> Attachments: HIVE-1884.1.PATCH
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

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



[jira] Commented: (HIVE-1884) Potential risk of resource leaks in Hive

2011-01-24 Thread Namit Jain (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985831#action_12985831
 ] 

Namit Jain commented on HIVE-1884:
--

Also, take a look at HIVE-1908, it is also looking at a similar problem

> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Mohit Sikri
> Attachments: HIVE-1884.1.PATCH
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

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



[jira] Commented: (HIVE-1884) Potential risk of resource leaks in Hive

2011-01-24 Thread Ning Zhang (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986260#action_12986260
 ] 

Ning Zhang commented on HIVE-1884:
--

Mohit, there are conflicts when applying the patch to the current trunk. Can 
you regenerate the patch based on trunk?

> Potential risk of resource leaks in Hive
> 
>
> Key: HIVE-1884
> URL: https://issues.apache.org/jira/browse/HIVE-1884
> Project: Hive
>  Issue Type: Bug
>  Components: CLI, Metastore, Query Processor, Server Infrastructure
>Affects Versions: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
> Environment: Hive 0.6.0, Hadoop 0.20.1
> SUSE Linux Enterprise Server 11 (i586)
>Reporter: Mohit Sikri
>Assignee: Mohit Sikri
> Attachments: HIVE-1884.1.PATCH
>
>
> h3.There are couple of resource leaks.
> h4.For example,
> In CliDriver.java, 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 Throttle.java   Method:- checkJobTracker() , the following code snippet 
> might cause resource leak.
> {code}
> InputStream in = url.openStream();
> in.read(buffer);
> in.close();
> {code}
> Ideally and as per the best coding practices it should be like below
> {code}
> InputStream in=null;
> try   {
> in = url.openStream();
> int numRead = in.read(buffer);
> }
> finally {
>IOUtils.closeStream(in);
> }
> {code}
> Similar cases, were found in ExplainTask.java, DDLTask.java etc.Need to re 
> factor all such occurrences.

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