[ 
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<ImmutableBytesWritable, ResultWritable> 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)

Reply via email to