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

Ted Yu commented on HBASE-4417:
-------------------------------

Good catch Stefan.
Is there a reason that the patch for TRUNK doesn't include 1000 time loop ?

I put the loop in TestAdmin.java of TRUNK. Here is what I got when I ran 
TestAdmin#testCheckHBaseAvailableClosesConnection:
{code}
tyu-mbp:1 tyu$ netstat | grep 21818 | grep ESTABLISHED | wc
      12      72     948
tyu-mbp:1 tyu$ netstat | grep 21818 | grep ESTABLISHED | wc
      12      72     948
tyu-mbp:1 tyu$ netstat | grep 21818 | grep ESTABLISHED | wc
      12      72     948
tyu-mbp:1 tyu$ netstat | grep 21818 | grep ESTABLISHED | wc
      12      72     948
tyu-mbp:1 tyu$ netstat | grep 21818 | grep ESTABLISHED | wc
      12      72     948
tyu-mbp:1 tyu$ netstat | grep 21818 | grep ESTABLISHED | wc
       6      36     474
tyu-mbp:1 tyu$ netstat | grep 21818 | grep ESTABLISHED | wc
       0       0       0
{code}
This means that this issue is not so severe for TRUNK.
You may have seen this: 
http://zhihongyu.blogspot.com/2011/04/managing-connections-in-hbase-090-and.html

Anyway, I think the patches make sense.
Please add the loop to patch for TRUNK.

This particular method is used by Merge and tested by TestMergeTool.
Please see if TestMergeTool passes for 0.90 and TRUNK.

> HBaseAdmin.checkHBaseAvailable() doesn't close ZooKeeper connections
> --------------------------------------------------------------------
>
>                 Key: HBASE-4417
>                 URL: https://issues.apache.org/jira/browse/HBASE-4417
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.90.4, 0.92.0
>            Reporter: Stefan Seelmann
>            Assignee: Stefan Seelmann
>            Priority: Minor
>             Fix For: 0.92.0, 0.90.5
>
>         Attachments: HBASE-4417-0.90.diff, HBASE-4417-0.92.diff
>
>
> HBaseAdmin.checkHBaseAvailable(conf) clones the passed connection, later in 
> HBaseAdmin constructor the connection is cloned again. Thus a new HConnection 
> object with ZooKeeper connections is created.

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

        

Reply via email to