[jira] [Commented] (HIVE-12418) HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.

2016-01-06 Thread Aihua Xu (JIRA)

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

Aihua Xu commented on HIVE-12418:
-

finalize() is not guaranteed to run. Maybe that's why sometimes it works and 
sometime it doesn't.  I think it doesn't hurt to override finalize(), but I 
agree that somewhere we didn't call close() of RecordReader. I went through the 
code, but RecordReader was used in many places. I didn't see places that we 
forgot to call close(). 

> HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
> -
>
> Key: HIVE-12418
> URL: https://issues.apache.org/jira/browse/HIVE-12418
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 1.1.0
>Reporter: Naveen Gangam
>Assignee: Naveen Gangam
> Fix For: 2.0.0
>
> Attachments: HIVE-12418.patch
>
>
>   @Override
>   public RecordReader getRecordReader(
> ...
> ...
>  setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
> ...
> The HiveHBaseInputFormatUtil.getTable() creates new ZooKeeper 
> connections(when HTable instance is created) which are never closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-12418) HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.

2016-01-06 Thread Naveen Gangam (JIRA)

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

Naveen Gangam commented on HIVE-12418:
--


We had removed this form the original fix and committed without overriding 
finalize(). On re-testing the fix in a customer environment, customer reported 
that the fix with finalize() worked whereas the fix without the finalize() did 
not work. As this was the only difference, we had to re-insert the finalize() 
method.

With the new fix, the customer still reports that the original test fix works 
whereas the official fix does not resolve the issue (at this point they should 
be the same). I suspect this is an environmental issue now as opposed to having 
finalize().
I have used classes with finalize() in the past enough in WebLogic's JTA 
implementation (back in JDK1.3/1.4 era) and have not heard of any issues. But I 
am good with removing the finalize() if it is concerning.

> HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
> -
>
> Key: HIVE-12418
> URL: https://issues.apache.org/jira/browse/HIVE-12418
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 1.1.0
>Reporter: Naveen Gangam
>Assignee: Naveen Gangam
> Fix For: 2.0.0
>
> Attachments: HIVE-12418.patch
>
>
>   @Override
>   public RecordReader getRecordReader(
> ...
> ...
>  setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
> ...
> The HiveHBaseInputFormatUtil.getTable() creates new ZooKeeper 
> connections(when HTable instance is created) which are never closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-12418) HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.

2016-01-06 Thread Thejas M Nair (JIRA)

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

Thejas M Nair commented on HIVE-12418:
--

That usually means that the appropriate close is missing somewhere. I haven't 
looked at the hbase storage enough, so not sure.



> HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
> -
>
> Key: HIVE-12418
> URL: https://issues.apache.org/jira/browse/HIVE-12418
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 1.1.0
>Reporter: Naveen Gangam
>Assignee: Naveen Gangam
> Fix For: 2.0.0
>
> Attachments: HIVE-12418.patch
>
>
>   @Override
>   public RecordReader getRecordReader(
> ...
> ...
>  setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
> ...
> The HiveHBaseInputFormatUtil.getTable() creates new ZooKeeper 
> connections(when HTable instance is created) which are never closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-12418) HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.

2016-01-06 Thread Aihua Xu (JIRA)

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

Aihua Xu commented on HIVE-12418:
-

Yeah. I gave the same comments in HIVE-12250  and Naveen took that out there. 
But seems it still gave leaks and finalize() did take care of that. 

Do you have any suggestions on that?

> HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
> -
>
> Key: HIVE-12418
> URL: https://issues.apache.org/jira/browse/HIVE-12418
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 1.1.0
>Reporter: Naveen Gangam
>Assignee: Naveen Gangam
> Fix For: 2.0.0
>
> Attachments: HIVE-12418.patch
>
>
>   @Override
>   public RecordReader getRecordReader(
> ...
> ...
>  setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
> ...
> The HiveHBaseInputFormatUtil.getTable() creates new ZooKeeper 
> connections(when HTable instance is created) which are never closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-12418) HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.

2016-01-06 Thread Thejas M Nair (JIRA)

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

Thejas M Nair commented on HIVE-12418:
--

bq. Also overrides the Object.finalize() that closes these resources too in 
cases when RecordReader.close() is never called.
Is that expected to happen ?
We should avoid the use of finalizers as far as possible. See one article on 
that - 
https://plumbr.eu/blog/garbage-collection/debugging-to-understand-finalizer


> HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
> -
>
> Key: HIVE-12418
> URL: https://issues.apache.org/jira/browse/HIVE-12418
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 1.1.0
>Reporter: Naveen Gangam
>Assignee: Naveen Gangam
> Fix For: 2.0.0
>
> Attachments: HIVE-12418.patch
>
>
>   @Override
>   public RecordReader getRecordReader(
> ...
> ...
>  setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
> ...
> The HiveHBaseInputFormatUtil.getTable() creates new ZooKeeper 
> connections(when HTable instance is created) which are never closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-12418) HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.

2015-11-19 Thread Naveen Gangam (JIRA)

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

Naveen Gangam commented on HIVE-12418:
--

Thanks for the code review and committing it.

> HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
> -
>
> Key: HIVE-12418
> URL: https://issues.apache.org/jira/browse/HIVE-12418
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 1.1.0
>Reporter: Naveen Gangam
>Assignee: Naveen Gangam
> Fix For: 2.0.0
>
> Attachments: HIVE-12418.patch
>
>
>   @Override
>   public RecordReader getRecordReader(
> ...
> ...
>  setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
> ...
> The HiveHBaseInputFormatUtil.getTable() creates new ZooKeeper 
> connections(when HTable instance is created) which are never closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-12418) HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.

2015-11-19 Thread Naveen Gangam (JIRA)

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

Naveen Gangam commented on HIVE-12418:
--

The test failures are not related to the fix. 

> HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
> -
>
> Key: HIVE-12418
> URL: https://issues.apache.org/jira/browse/HIVE-12418
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 1.1.0
>Reporter: Naveen Gangam
>Assignee: Naveen Gangam
> Attachments: HIVE-12418.patch
>
>
>   @Override
>   public RecordReader getRecordReader(
> ...
> ...
>  setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
> ...
> The HiveHBaseInputFormatUtil.getTable() creates new ZooKeeper 
> connections(when HTable instance is created) which are never closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-12418) HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.

2015-11-18 Thread Hive QA (JIRA)

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

Hive QA commented on HIVE-12418:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12772761/HIVE-12418.patch

{color:red}ERROR:{color} -1 due to no test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 9865 tests executed
*Failed tests:*
{noformat}
TestHWISessionManager - did not produce a TEST-*.xml file
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_uri_import
org.apache.hive.jdbc.TestSSL.testSSLVersion
{noformat}

Test results: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/6072/testReport
Console output: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/6072/console
Test logs: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-6072/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 3 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12772761 - PreCommit-HIVE-TRUNK-Build

> HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
> -
>
> Key: HIVE-12418
> URL: https://issues.apache.org/jira/browse/HIVE-12418
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 1.1.0
>Reporter: Naveen Gangam
>Assignee: Naveen Gangam
> Attachments: HIVE-12418.patch
>
>
>   @Override
>   public RecordReader getRecordReader(
> ...
> ...
>  setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
> ...
> The HiveHBaseInputFormatUtil.getTable() creates new ZooKeeper 
> connections(when HTable instance is created) which are never closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-12418) HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.

2015-11-17 Thread Aihua Xu (JIRA)

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

Aihua Xu commented on HIVE-12418:
-

+1. Looks good to me.

> HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
> -
>
> Key: HIVE-12418
> URL: https://issues.apache.org/jira/browse/HIVE-12418
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 1.1.0
>Reporter: Naveen Gangam
>Assignee: Naveen Gangam
> Attachments: HIVE-12418.patch
>
>
>   @Override
>   public RecordReader getRecordReader(
> ...
> ...
>  setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
> ...
> The HiveHBaseInputFormatUtil.getTable() creates new ZooKeeper 
> connections(when HTable instance is created) which are never closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-12418) HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.

2015-11-17 Thread Naveen Gangam (JIRA)

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

Naveen Gangam commented on HIVE-12418:
--

Code has been posted to reviewboard at https://reviews.apache.org/r/40390/. 

> HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
> -
>
> Key: HIVE-12418
> URL: https://issues.apache.org/jira/browse/HIVE-12418
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 1.1.0
>Reporter: Naveen Gangam
>Assignee: Naveen Gangam
> Attachments: HIVE-12418.patch
>
>
>   @Override
>   public RecordReader getRecordReader(
> ...
> ...
>  setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
> ...
> The HiveHBaseInputFormatUtil.getTable() creates new ZooKeeper 
> connections(when HTable instance is created) which are never closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-12418) HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.

2015-11-17 Thread Naveen Gangam (JIRA)

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

Naveen Gangam commented on HIVE-12418:
--

The proposed fix closes the HTable resources when RecordReader.close() is 
called. Also overrides the Object.finalize() that closes these resources too in 
cases when RecordReader.close() is never called.

> HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
> -
>
> Key: HIVE-12418
> URL: https://issues.apache.org/jira/browse/HIVE-12418
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 1.1.0
>Reporter: Naveen Gangam
>Assignee: Naveen Gangam
> Attachments: HIVE-12418.patch
>
>
>   @Override
>   public RecordReader getRecordReader(
> ...
> ...
>  setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
> ...
> The HiveHBaseInputFormatUtil.getTable() creates new ZooKeeper 
> connections(when HTable instance is created) which are never closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)